-
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.
Each build will get one or more image tags, depending on whether it's a build of the master branch, a PR branch, or a release branch. Computation of the image tags is handled by the metadata-action workflow. * Add git-version-gen script to compute a VERSION value from the git repo. * Remove the .version file; this is now computed by the git-version-gen script. * Add rules to Makefile to generate the .version file and use its value. * Use "v" prefix in release tag filter. * Add workflow to verify that tags are annotated. * Use metadata-action to generate all of the appropriate tags for the build * Use build-push-action to execute all of the tags for the build. Tagging: * Builds of the master branch get an image tag of "master". * Builds of a PR branch get an image tag similar to "pr-3". * Builds of a PR or merge event get an image tag similar to "0.0.1.12-9e04", which is the value generated by git-version-gen. * Builds of a PR or merge event will get an image tag that is the long SHA of the top commit, which is the image tag expected by nnf-deploy. * Builds of a push to a tag will get an image tag that matches the git tag. * Builds of a push to a tag will get an image tag of "latest". Signed-off-by: Dean Roehrich <[email protected]>
- Loading branch information
1 parent
0f5951d
commit 409e4fc
Showing
6 changed files
with
323 additions
and
66 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Pushing a tag triggers this workflow, which verifies that it is an | ||
# annotated tag. | ||
name: Verify tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# actions/checkout@v3 breaks annotated tags by converting them into | ||
# lightweight tags, so we need to force fetch the tag again | ||
# See: https://github.com/actions/checkout/issues/290 | ||
- name: "Repair tag" | ||
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} | ||
- name: "Verify tag is annotated" | ||
run: if test x$(git for-each-ref ${{ github.ref }} | awk '{print $2}') = xtag; then /bin/true; else echo "\"${{ github.ref }}\" does not look like an annotated tag!"; /bin/false; fi | ||
- name: "Echo release tag" | ||
run: echo "TAG=${{ github.repository }}:${{ github.ref }}" |
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
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
Oops, something went wrong.