Skip to content

Commit

Permalink
first actual attempt of publishing biceps
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Kruining committed Nov 25, 2024
1 parent 0e5f822 commit 8fd2bf0
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
runs-on: ubuntu-latest
outputs:
semver: ${{ steps.gitversion.outputs.SemVer }}
major: ${{ steps.gitversion.outputs.Major }}
minor: ${{ steps.gitversion.outputs.Minor }}
patch: ${{ steps.gitversion.outputs.Patch }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,6 +65,9 @@ jobs:
name: Publish
runs-on: ubuntu-latest
needs: [ prepare, infra ]
defaults:
run:
working-directory: ./src
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -79,10 +85,18 @@ jobs:
uses: azure/cli@v2
with:
inlineScript: |
for x in $(ls -al src); do
echo "$x"
for x in $(find . -type d -name internal -prune -o -type f -name "*.bicep"); do
name=${x#"./"}
name=${name%".bicep"}
name="br:${{ secrets.ACR_LOGIN_SERVER }}/$name"
major="${{needs.prepare.outputs.major}}"
minor="${{needs.prepare.outputs.minor}}"
patch="${{needs.prepare.outputs.patch}}"
az bicep publish --file "$x" --target "$name:latest" --with-source --force
az bicep publish --file "$x" --target "$name:$major" --with-source --force
az bicep publish --file "$x" --target "$name:$major.$minor" --with-source --force
az bicep publish --file "$x" --target "$name:$major.$minor.$patch" --with-source
done
# az bicep publish \
# --file src/main.bicep \
# --target 'br:toycompany.azurecr.io/main:${{needs.prepare.outputs.semver}}'

0 comments on commit 8fd2bf0

Please sign in to comment.