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

Migrate to ghcr.io #103

Merged
merged 1 commit into from
Jan 24, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:

- name: Build setup-hw image
run: |
docker build -t quay.io/cybozu/setup-hw:latest --target stage1 docker
docker build -t quay.io/cybozu/setup-hw-secret:latest docker
docker build -t ghcr.io/cybozu-go/setup-hw:latest --target stage1 docker
docker build -t ghcr.io/cybozu-go/setup-hw-secret:latest docker
18 changes: 12 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@ jobs:

- name: Build setup-hw image
run: |
docker build -t quay.io/cybozu/setup-hw:latest --target stage1 docker
docker build -t quay.io/cybozu/setup-hw-secret:latest docker
docker build -t ghcr.io/cybozu-go/setup-hw:latest --target stage1 docker
docker build -t ghcr.io/cybozu-go/setup-hw-secret:latest docker

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push images
run: |
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io
tag=${GITHUB_REF#refs/tags/v}
for name in setup-hw setup-hw-secret; do
echo "pushing ${name}:v${tag} ..."
docker tag quay.io/cybozu/${name}:latest quay.io/cybozu/${name}:$tag
if ! echo $tag | grep -q -e '-'; then docker push quay.io/cybozu/${name}:latest; fi
docker push quay.io/cybozu/${name}:$tag
docker tag ghcr.io/cybozu-go/${name}:latest ghcr.io/cybozu-go/${name}:$tag
if ! echo $tag | grep -q -e '-'; then docker push ghcr.io/cybozu-go/${name}:latest; fi
docker push ghcr.io/cybozu-go/${name}:$tag
done

- name: Create release
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ ifdef GOBIN
else
cp $(foreach f, $(BINS_IMAGE), $(GOPATH)/bin/$(f)) ./docker/
endif
cd docker && docker build -t quay.io/cybozu/setup-hw:dev .
cd docker && docker build -t ghcr.io/cybozu-go/setup-hw:dev .

.PHONY: all generate check-generate setup test install build-image
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ docker run -d --name=setup-hw \
Docker images
-------------

Docker images are available on [Quay.io](https://quay.io/repository/cybozu/setup-hw)
Docker images are available on [ghcr.io](https://github.com/cybozu-go/setup-hw/pkgs/container/setup-hw)

### Access `monitor-hw`

Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:22.04 as stage1
LABEL org.opencontainers.image.source="https://github.com/cybozu-go/setup-hw"

COPY setup-hw /usr/local/bin/setup-hw
COPY monitor-hw /usr/local/sbin/monitor-hw
Expand All @@ -9,6 +10,7 @@ CMD ["/usr/local/sbin/monitor-hw"]

# Install vendor tools
FROM stage1
LABEL org.opencontainers.image.source="https://github.com/cybozu-go/setup-hw"

# See https://linux.dell.com/repo/community/openmanage/
ARG OMSA_VERSION=11000
Expand Down