Skip to content

Commit

Permalink
Migrate to the github container registry
Browse files Browse the repository at this point in the history
  • Loading branch information
shouichi committed Sep 5, 2023
1 parent 9dc4ba2 commit 2f7ca88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ jobs:
with:
repository: google/copybara
ref: master
- name: Login to github docker registry
run: docker login -u $USER -p $TOKEN
env:
USER: ${{ secrets.DOCKER_HUB_USERNAME }}
TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build copybara docker image
run: |
docker build -t copybara .
- name: Tag copybara docker images
run: |
docker tag copybara anipos/copybara:latest
docker tag copybara anipos/copybara:$(git rev-parse HEAD)
- name: Push copybara docker images
run: |
docker push anipos/copybara:latest
docker push anipos/copybara:$(git rev-parse HEAD)
- id: meta
run: echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.sha }},latest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ actions. It should be a temporal workaround for the official image being not
available (see https://github.com/google/copybara/issues/82).

The built image is available at
https://hub.docker.com/r/anipos/copybara.
https://github.com/anipos/copybara-docker-image/pkgs/container/copybara-docker-image.

0 comments on commit 2f7ca88

Please sign in to comment.