Skip to content

Commit c853870

Browse files
authored
Merge pull request #103 from cybozu-go/migrate-to-ghcr
Migrate to ghcr.io
2 parents 97c3f1e + 5921627 commit c853870

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

.github/workflows/main.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ jobs:
3131

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

.github/workflows/release.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ jobs:
2121

2222
- name: Build setup-hw image
2323
run: |
24-
docker build -t quay.io/cybozu/setup-hw:latest --target stage1 docker
25-
docker build -t quay.io/cybozu/setup-hw-secret:latest docker
24+
docker build -t ghcr.io/cybozu-go/setup-hw:latest --target stage1 docker
25+
docker build -t ghcr.io/cybozu-go/setup-hw-secret:latest docker
26+
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
2633

2734
- name: Push images
2835
run: |
29-
echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io
3036
tag=${GITHUB_REF#refs/tags/v}
3137
for name in setup-hw setup-hw-secret; do
3238
echo "pushing ${name}:v${tag} ..."
33-
docker tag quay.io/cybozu/${name}:latest quay.io/cybozu/${name}:$tag
34-
if ! echo $tag | grep -q -e '-'; then docker push quay.io/cybozu/${name}:latest; fi
35-
docker push quay.io/cybozu/${name}:$tag
39+
docker tag ghcr.io/cybozu-go/${name}:latest ghcr.io/cybozu-go/${name}:$tag
40+
if ! echo $tag | grep -q -e '-'; then docker push ghcr.io/cybozu-go/${name}:latest; fi
41+
docker push ghcr.io/cybozu-go/${name}:$tag
3642
done
3743
3844
- name: Create release

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ ifdef GOBIN
4949
else
5050
cp $(foreach f, $(BINS_IMAGE), $(GOPATH)/bin/$(f)) ./docker/
5151
endif
52-
cd docker && docker build -t quay.io/cybozu/setup-hw:dev .
52+
cd docker && docker build -t ghcr.io/cybozu-go/setup-hw:dev .
5353

5454
.PHONY: all generate check-generate setup test install build-image

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ docker run -d --name=setup-hw \
3737
Docker images
3838
-------------
3939

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

4242
### Access `monitor-hw`
4343

docker/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM ubuntu:22.04 as stage1
2+
LABEL org.opencontainers.image.source="https://github.com/cybozu-go/setup-hw"
23

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

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

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

0 commit comments

Comments
 (0)