Skip to content

Commit

Permalink
Updated package tag to be an output of build-and-test job
Browse files Browse the repository at this point in the history
  • Loading branch information
mhaswell-bcgov committed Apr 25, 2024
1 parent 18d7ede commit 31c6b22
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/buildTestPublishContainerDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
- published
pull_request:
workflow_dispatch:
env:
notifyBCContainerTag: latest
jobs:
build-and-test:
runs-on: ubuntu-latest
outputs:
package-tag: ${{ steps.set-package-version.outputs.package-tag }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4.1.4
Expand All @@ -26,12 +26,15 @@ jobs:
npm ci
yarn test
- name: Set package version
id: set-package-version
run: |
echo "notifyBCContainerTag=$(npm pkg get version)" >> $GITHUB_ENV
echo package-tag=$(npm pkg get version) >> $GITHUB_OUTPUT
publish-container:
if: ${{ github.repository == 'bcgov/des-notifybc' && github.event_name != 'pull_request' }}
needs: build-and-test
runs-on: ubuntu-latest
env:
notifyBCContainerTag: ${{needs.build-and-test.outputs.package-tag}}
steps:
- name: Save $notifyBCContainerTag to file
run: |
Expand Down

0 comments on commit 31c6b22

Please sign in to comment.