-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'Rolling Tag' logic for pre/release builds (#47)
* cd.yml: Moved tagging logic to before deployment * ci.yml: Added tagging logic to before prerelease deployment * git user.email now uses github-actions userid See ACCESS-NRI/reproducibility#19 * Updated to use the organisational vars for GH_ACTIONS_BOT_GIT_USER_{NAME,EMAIL}
- Loading branch information
Showing
2 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,32 +50,33 @@ jobs: | |
version-pattern: ${{ needs.generate-tag.outputs.name }}-* | ||
secrets: inherit | ||
|
||
deploy-release: | ||
name: Deploy Release | ||
needs: | ||
- generate-tag | ||
uses: access-nri/build-cd/.github/workflows/deploy-1-setup.yml@main | ||
with: | ||
ref: ${{ github.ref_name }} | ||
version: ${{ needs.generate-tag.outputs.name }} | ||
secrets: inherit | ||
permissions: | ||
contents: write | ||
|
||
push-tag: | ||
name: Tag Deployment | ||
needs: | ||
- generate-tag | ||
- deploy-release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Push Tag | ||
# NOTE: Regarding the config user.name/user.email, see https://github.com/actions/checkout/pull/1184 | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git tag ${{ needs.generate-tag.outputs.name }} | ||
git push --tags | ||
git config user.name ${{ vars.GH_ACTIONS_BOT_GIT_USER_NAME }} | ||
git config user.email ${{ vars.GH_ACTIONS_BOT_GIT_USER_EMAIL }} | ||
git tag ${{ needs.generate-tag.outputs.name }} --force | ||
git push --tags --force | ||
deploy-release: | ||
name: Deploy Release | ||
needs: | ||
- generate-tag | ||
- push-tag | ||
uses: access-nri/build-cd/.github/workflows/deploy-1-setup.yml@main | ||
with: | ||
ref: ${{ github.ref_name }} | ||
version: ${{ needs.generate-tag.outputs.name }} | ||
secrets: inherit | ||
permissions: | ||
contents: write |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters