Skip to content
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

cke-tools: Migrate to ghcr.io #682

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/release-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,20 @@ jobs:
run: |
cd tools
make all
- name: Push cke-tools image to Quay.io
run: |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io
TAG=quay.io/cybozu/cke-tools:${GITHUB_REF#refs/tags/tools-}
docker build --no-cache -t $TAG tools
docker push $TAG
- name: Extract tag
id: extract-tag
run: echo "tag=${GITHUB_REF#refs/tags/tools-}" >> $GITHUB_OUTPUT
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push cke-tools
uses: docker/build-push-action@v5
with:
context: ./tools
push: true
platforms: linux/amd64
tags: ghcr.io/${{ github.repository_owner }}/cke-tools:${{ steps.extract-tag.outputs.tag }}
labels: org.opencontainers.image.source=https://github.com/${{ github.repository }}
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CNI_PLUGIN_VERSION = 1.3.0
TAG = quay.io/cybozu/cke-tools:dev
TAG = ghcr.io/cybozu-go/cke-tools:dev
GOBUILD = CGO_ENABLED=0 go build -ldflags="-w -s"

.PHONY: all
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This directory contains source code to build `cke-tools`, a helper container for CKE.

The container image is pushed to [quay.io/cybozu/cke-tools](https://quay.io/repository/cybozu/cke-tools) by GitHub Actions.
The container image is pushed to [ghcr.io/cybozu-go/cke-tools](https://github.com/cybozu-go/cke/pkgs/container/cke-tools) by GitHub Actions.

See [RELEASE.md](RELEASE.md) for how to push a new image version.
2 changes: 1 addition & 1 deletion tools/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ The patch version is increased with `cke-tools` update.
$ git push origin "tools-$VERSION"
```

GitHub Actions will build and push the new image as `quay.io/cybozu/cke-tools:X.Y.Z`.
GitHub Actions will build and push the new image as `ghcr.io/cybozu-go/cke-tools:X.Y.Z`.

[semver]: https://semver.org/spec/v2.0.0.html