From 6f08e8c0f27220c1b8e3973353e2ca0ede3e8bb1 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Tue, 14 Dec 2021 22:25:35 +0100 Subject: [PATCH] Use ghcr.io instead of Docker Hub (#1855) --- .github/workflows/main.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a7407be..20354569 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,8 @@ -# This is a basic workflow to help you get started with Actions - name: CI +permissions: + packages: write + on: schedule: - cron: '0 10 * * *' # everyday at 10am @@ -48,10 +49,11 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: docker/metadata-action@v3 with: - images: yzernik/squeaknode - tag-sha: true # add git short SHA as Docker tag + images: ghcr.io/${{ github.repository_owner }}/squeaknode + tags: | + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -67,11 +69,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - - name: Login to DockerHub + name: Login to GitHub Container Registry uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push id: docker_build