Skip to content

Commit

Permalink
Merge pull request #53 from Azure/aaqib-m/update-publish
Browse files Browse the repository at this point in the history
fix: process outputs between jobs
  • Loading branch information
aaqib-m authored Mar 21, 2024
2 parents 4f9828d + 22ff523 commit 8650cdd
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release and Publish
name: Publish

on:
push:
Expand Down Expand Up @@ -26,35 +26,19 @@ jobs:
else
IMG_TAG=${{ github.event.inputs.releaseTag }}
fi
IMG="${{ secrets.AZURE_CONTAINER_REGISTRY }}/public/aks/msi-acrpull:${IMG_TAG}"
IMG="/public/aks/msi-acrpull:${IMG_TAG}"
echo "IMG_TAG=${IMG_TAG}" >> ${GITHUB_OUTPUT}
echo "IMG=${IMG}" >> ${GITHUB_OUTPUT}
outputs:
IMG_TAG: ${{ steps.get_metadata.outputs.IMG_TAG }}
IMG: ${{ steps.get_metadata.outputs.IMG }}

release:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.setup.outputs.IMG_TAG }}
release_name: Release ${{ needs.setup.outputs.IMG_TAG }}
draft: true

publish:
runs-on:
labels: ["self-hosted", "1ES.Pool=${{ vars.RUNNER_BASE_NAME}}-ubuntu"]
needs: setup
env:
IMG: ${{ needs.setup.outputs.IMG }}
IMG: ${{ secrets.AZURE_CONTAINER_REGISTRY }}${{ needs.setup.outputs.IMG }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down

0 comments on commit 8650cdd

Please sign in to comment.