-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix docker release #1831
Merged
Merged
Fix docker release #1831
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c4b2bdf
Fix Docker workflow triggers
gpmayorga 3e400db
Merge branch 'main' into fix-docker-release
gpmayorga 083f467
try updating relase notes
gpmayorga 2ee7e0e
avoid multiple triggers on release
gpmayorga 1048539
update release only for one of the docker builds
gpmayorga 61d9cfb
test updating release
gpmayorga 6f355d2
Update release comments
gpmayorga 4566495
final version
gpmayorga 6e1bdcd
create a docker tag on release creation only
gpmayorga 143a832
Merge remote-tracking branch 'origin/main' into fix-docker-release
gpmayorga e49d0d2
better docker build for releases
gpmayorga 216a029
push to DH on tag and release
gpmayorga 8a25ac3
Merge branch 'main' into fix-docker-release
gpmayorga 1efc5a5
Merge branch 'main' into fix-docker-release
wischli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -3,11 +3,13 @@ on: | |
# Keep in mind the Docker tagging on the "metadata" step if you add new triggers | ||
workflow_dispatch: # In case a repo contributor needs a specific docker tag built. | ||
push: | ||
tags: ['v*.*.*'] | ||
branches: [main] | ||
release: | ||
# Release logic: | ||
# https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=unpublished#release | ||
types: [ created ] # GITHUB_REF == tag pushed with the release | ||
# | ||
types: [ released ] # GITHUB_REF == tag pushed with the release | ||
pull_request: | ||
paths: | ||
- ".github/workflows/build-docker.yml" | ||
|
@@ -55,7 +57,12 @@ jobs: | |
with: | ||
images: | | ||
ghcr.io/centrifuge/centrifuge-chain | ||
${{ github.event_name != 'pull_request' && 'centrifugeio/centrifuge-chain' || ''}} | ||
${{ (github.event_name == 'release' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))) && 'centrifugeio/centrifuge-chain' || ''}} | ||
# TAGS: | ||
# v.X.Y.Z when pushing a git tag (or a release) | ||
# latest when triggered by a release | ||
# PRXYZ when triggered from a PR (testing) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you elaborate on this, i.e., how can I trigger it from a PR? |
||
# {BRANCH_NAME} when triggered from branch push | ||
tags: | | ||
type=semver,pattern={{raw}},prefix=${{ matrix.target == 'test' && 'test-' || '' }} | ||
type=raw,value=latest,enable=${{ github.event_name == 'release' }} | ||
|
@@ -105,12 +112,12 @@ jobs: | |
enable-url-completion: true | ||
|
||
- name: Update GitHub release | ||
if: github.event_name == 'release' && matrix.target == 'release' | ||
if: github.event_name == 'release' && github.event.action == 'released' && matrix.target == 'release' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
append_body: true | ||
body: | | ||
**Docker tags:** | ||
**Docker tags (${{ env.NOW }}):** | ||
${{ steps.meta.outputs.tags }} | ||
|
||
- if: failure() | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit