forked from kokonect-link/cherrypick
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Docker Hub to ghcr.io for CI builds
- Loading branch information
1 parent
4f4a292
commit eb96bcf
Showing
1 changed file
with
13 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY_IMAGE: noridev/cherrypick | ||
REGISTRY_IMAGE: ghcr.io/${{ github.repository }} | ||
|
||
jobs: | ||
# see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners | ||
|
@@ -20,32 +20,26 @@ jobs: | |
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
if: github.repository == 'kokonect-link/cherrypick' | ||
outputs: | ||
commit_sha: ${{ steps.git.outputs.commit_sha }} | ||
steps: | ||
- name: Free Disk Space | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
# All of these default to true, but feel free to set to "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
swap-storage: true | ||
- name: Prepare | ||
run: | | ||
platform=${{ matrix.platform }} | ||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV | ||
- name: Check out the repo | ||
uses: actions/[email protected] | ||
- name: Get commit sha | ||
id: git | ||
run: echo "commit_sha=$(git rev-parse --short=7 HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push by digest | ||
id: build | ||
uses: docker/build-push-action@v5 | ||
|
@@ -84,11 +78,11 @@ jobs: | |
merge-multiple: true | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
- name: Log in to Container registry | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create manifest list and push | ||
working-directory: /tmp/digests | ||
run: | | ||
|