Skip to content

Commit

Permalink
Merge pull request #38 from rcwbr/6-convert-release-it-automation-to-…
Browse files Browse the repository at this point in the history
…use-tagged-workflow-ref-and-self-image-ref

Convert release-it automation to use tagged workflow ref and self image ref
  • Loading branch information
rcwbr authored Oct 31, 2024
2 parents b8f554a + 9505359 commit af069e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/push-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
name: Docker Buildx builder setup
uses: docker/[email protected]
-
id: docker-bake-base
name: Docker Bake base
uses: docker/[email protected]
with:
Expand All @@ -31,8 +32,8 @@ jobs:
env:
REGISTRY: ghcr.io/rcwbr/
IMAGE_NAME: release-it-docker
GITHUB_REF_PROTECTED: ${{ github.ref_protected || github.ref_type == 'tag' }} # See https://github.com/orgs/community/discussions/142985
-
id: docker-bake-conventional-changelog
name: Docker Bake conventional-changelog
uses: docker/[email protected]
with:
Expand All @@ -44,12 +45,15 @@ jobs:
env:
REGISTRY: ghcr.io/rcwbr/
IMAGE_NAME: release-it-docker-conventional-changelog
GITHUB_REF_PROTECTED: ${{ github.ref_protected || github.ref_type == 'tag' }} # See https://github.com/orgs/community/discussions/142985
outputs:
docker-bake-base-metadata: ${{ steps.docker-bake-base.outputs.metadata }}
docker-bake-conventional-changelog-metadata: ${{ steps.docker-bake-conventional-changelog.outputs.metadata }}
release-it-workflow:
name: Release-it workflow
# uses: rcwbr/release-it-gh-workflow/.github/workflows/[email protected] TODO use released ref
uses: rcwbr/release-it-gh-workflow/.github/workflows/release-it-workflow.yaml@1-define-initial-workflow
uses: rcwbr/release-it-gh-workflow/.github/workflows/[email protected]
needs: build-docker-images
with:
release-it-image: ${{ fromJSON(needs.build-docker-images.outputs.docker-bake-conventional-changelog-metadata)['default']['image.name'] }}
app-id: 1033419 # release-it-docker CI release-it app
app-environment: Repo release
secrets:
Expand Down
2 changes: 1 addition & 1 deletion conventional-changelog/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
target "default" {
contexts = {
base = (
"${GITHUB_REF_PROTECTED}" == "true"
("${GITHUB_REF_PROTECTED}" == "true" || "${GITHUB_REF_TYPE}" == "tag" )
? "docker-image://${REGISTRY}release-it-docker:${VERSION}"
: "docker-image://${REGISTRY}release-it-docker:${VERSION}-${GITHUB_SHA}"
)
Expand Down

0 comments on commit af069e3

Please sign in to comment.