Skip to content

Commit

Permalink
Can upload to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Dec 24, 2022
1 parent 1150ec0 commit f62baa9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
docker run --rm --privileged multiarch/qemu-user-static:register
sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_LOGIN }}" --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
- name: Build image
run: make build
- name: Publish image
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ qemu-aarch64-static:
build: qemu-arm-static qemu-aarch64-static
$(foreach arch,$(archs), \
cat Dockerfile | sed "s/FROM docker/FROM ${arch}\/docker/g" > .Dockerfile; \
docker build -t femtopixel/builder:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
docker build -t femtopixel/builder:${VERSION}-$(arch) -t ghcr.io/femtopixel/builder:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
)
publish:
docker push femtopixel/builder -a
docker push ghcr.io/femtopixel/builder -a
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
mv manifest2.yaml manifest.yaml
manifest-tool push from-spec manifest.yaml
latest: build
cat manifest.yaml | sed "s/femtopixel/ghcr.io\/femtopixel/g" > manifest2.yaml
mv manifest2.yaml manifest.yaml
manifest-tool push from-spec manifest.yaml
latest:
FULLVERSION=latest VERSION=${VERSION} make publish

0 comments on commit f62baa9

Please sign in to comment.