Skip to content

Commit

Permalink
ci(.github/workflows/wsl-docker.yml): use . as tag delimiter to work …
Browse files Browse the repository at this point in the history
…with renovate (#888)

* ci(.github/workflows/wsl-docker.yml): use . as tag delimiter to work with renovate

* ci(.github/workflows/wsl-docker.yml): create a new github package if not created

* ci(.github/workflows/test.yml): update docker image tag
  • Loading branch information
risu729 authored Nov 18, 2024
1 parent 82a5732 commit 3bd1db4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
contents: read # for checkout

container:
image: ghcr.io/risu729/dotfiles/wsl:24.04-20241029@sha256:ecbe37b6809e651605e7a028441293eda51647e5e2cc80d599f55b39e6d727d6
image: ghcr.io/risu729/dotfiles/wsl:24.04.20241115@sha256:cb541f971934a2e35f9811453e572311fb9120a5e757199d61a7a1e89f2ce589

steps:
- name: Run installer
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/wsl-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ jobs:
echo "Failed to get the serial" >&2
exit 1
fi
# + cannot be used in the tag, so use - instead
echo "tag=${{ steps.version.outputs.version }}-${serial}" >> "${GITHUB_OUTPUT}"
# + is appropriate for build date as semver but it cannot be used in docker tag
# use . instead because - is treated as platform/compatibility indicator by renovate
# ref: https://docs.renovatebot.com/modules/versioning/docker/
echo "tag=${{ steps.version.outputs.version }}.${serial}" >> "${GITHUB_OUTPUT}"
- name: Get latest Ubuntu WSL image tag
id: latest-tag
Expand Down Expand Up @@ -129,7 +131,8 @@ jobs:
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
# create a new package if the image is not found
push: ${{ github.event_name != 'pull_request' || steps.latest-tag.outcome == 'failure' }}
# avoid image without manifest created
# ref: https://github.com/docker/build-push-action/issues/900
provenance: false
Expand Down

0 comments on commit 3bd1db4

Please sign in to comment.