-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#211] Updated tags to match workflow triggers. #212
Conversation
.github/workflows/build-deploy.yml
Outdated
org.opencontainers.image.title=${{ matrix.images }} | ||
org.opencontainers.image.description=${{ matrix.images }} image for Bay container platform | ||
|
||
- name: Build and push the images | ||
if: ${{ !env.ACT }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't and it's gone 😄
|
||
`build/2.x-updated-cli` will generate the tag `build-2-x-updated-cli` and would be referenced as `ghcr.io/dpc-sdp/bay/<bay-image>:build-2-x-updated-cli`. | ||
### Development builds | ||
GitHub Actions is configured via the [build-deploy workflow](.github/workflows/build-deploy.yml) to build images for pull requests when they are opened and receive updates. These images are tagged with the PR number i.e. pr-86. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Just wanted to make sure the images are tagged correctly, and they are 🎉 |
Checklist
Refer to #211 for detail of the scenarios.
Relevant fields in the output of each scenario
Scenario
1 and 2 pull_request opened, synchronize ✅
❯ $HOME/go/src/github.com/nektos/act/dist/local/act pull_request -W .github/workflows/build-deploy.yml --defaultbranch "5.x" --actor "GROwen" -s GITHUB_TOKEN --var BRANCHES='["5.x"]' --var IMAGES='["ci-builder"]' --env REGISTRY=ghcr.io --container-architecture linux/amd64 --rm -P ubuntu-latest=catthehacker/ubuntu:act-latest -e .github/pull_request.json
Output
3. pull_request closed and merged ✅
$HOME/go/src/github.com/nektos/act/dist/local/act pull_request -W .github/workflows/build-deploy.yml --defaultbranch "5.x" --actor "GROwen" -s GITHUB_TOKEN --var BRANCHES='["5.x"]' --var IMAGES='["ci-builder"]' --env REGISTRY=ghcr.io --container-architecture linux/amd64 --rm -P ubuntu-latest=catthehacker/ubuntu:act-latest -e .github/pull_request.json
Output
4. Schedule ✅
Using a base branch of
6.x
because of a limitation with howact
calculates the ref_name for workflow triggers that don't have an associated webhook event payload i.e. schedule :)$HOME/go/src/github.com/nektos/act/dist/local/act schedule -W .github/workflows/build-deploy.yml --actor "GROwen" -s GITHUB_TOKEN --var BRANCHES='["5.x"]' --var IMAGES='["ci-builder"]' --env REGISTRY=ghcr.io --container-architecture linux/amd64 --rm -P ubuntu-latest=catthehacker/ubuntu:act-latest
Output
5. workflow_dispatch ❌
I think this failure is due to an issue with
act
not calculating github.ref_name for workflow_dispatch but will test on GHA once this PR is published. Because workflow_dispatches aren't a critical component I'm satisfied for this to fail for now.❯ $HOME/go/src/github.com/nektos/act/dist/local/act workflow_dispatch -W .github/workflows/build-deploy.yml --defaultbranch "5.x" --actor "GROwen" -s GITHUB_TOKEN --var BRANCHES='["5.x"]' --var IMAGES='["ci-builder"]' --env REGISTRY=ghcr.io --container-architecture linux/amd64 --rm -P ubuntu-latest=catthehacker/ubuntu:act-latest -e .github/workflow_dispatch.json
Output
Changelog Entry
Refactors the workflow event triggers and associated tag assignment so that the expected behaviour for the scenarios outlined in issue #211 are met.
Closing issues
Closes #211