From fddf1ae68a3391b05589a50749587fcde532aeb0 Mon Sep 17 00:00:00 2001 From: Tyrone Faulhaber <20131658+spectrapulse@users.noreply.github.com> Date: Sun, 24 Sep 2023 23:08:28 +0200 Subject: [PATCH 1/4] Update build-push.yml --- .github/workflows/build-push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 7f31bda..866f19f 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -39,7 +39,7 @@ jobs: with: # list of Docker images to use as base name for tags images: | - ghcr.io/spoticordmusic/spoticord + ghcr.io/kankerdev/spoticord/bot # Docker tags based on the following events/attributes tags: | type=raw,value=latest,enable={{is_default_branch}} @@ -59,5 +59,5 @@ jobs: tags: ${{ steps.spoticord.outputs.tags }} labels: ${{ steps.spoticord.outputs.labels }} # Some basic caching of the layers... - cache-from: ghcr.io/spoticordmusic/spoticord:latest-cache - cache-to: ghcr.io/spoticordmusic/spoticord:latest-cache + cache-from: ghcr.io/kankerdev/spoticord/bot:latest-cache + cache-to: ghcr.io/kankerdev/spoticord/bot:latest-cache From 35ca9603e60ba2681f44547f750ffca4b24a6774 Mon Sep 17 00:00:00 2001 From: Tyrone Faulhaber <20131658+spectrapulse@users.noreply.github.com> Date: Mon, 25 Sep 2023 17:30:23 +0200 Subject: [PATCH 2/4] Update build-push.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use GitHub's provided vars to avoid headaches for everyone™ --- .github/workflows/build-push.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 866f19f..dfbcbf6 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -8,15 +8,14 @@ on: branches: [ "main", "dev" ] workflow_dispatch: +permissions: + packages: write + contents: read + jobs: build-and-push: name: Build Docker image and push to registry runs-on: ubuntu-latest - - permissions: - packages: write - contents: read - steps: - name: Checkout code uses: actions/checkout@v3 @@ -39,7 +38,7 @@ jobs: with: # list of Docker images to use as base name for tags images: | - ghcr.io/kankerdev/spoticord/bot + ghcr.io/${{ github.repository }} # Docker tags based on the following events/attributes tags: | type=raw,value=latest,enable={{is_default_branch}} @@ -59,5 +58,5 @@ jobs: tags: ${{ steps.spoticord.outputs.tags }} labels: ${{ steps.spoticord.outputs.labels }} # Some basic caching of the layers... - cache-from: ghcr.io/kankerdev/spoticord/bot:latest-cache - cache-to: ghcr.io/kankerdev/spoticord/bot:latest-cache + cache-from: ghcr.io/${{ github.repository }}:latest-cache + cache-to: ghcr.io/${{ github.repository }}:latest-cache From 57935081a1f7aab5b223972f87c7f2e331f73cd8 Mon Sep 17 00:00:00 2001 From: Tyrone Faulhaber <20131658+spectrapulse@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:17:26 +0200 Subject: [PATCH 3/4] Update build-push.yml --- .github/workflows/build-push.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index dfbcbf6..7a216c4 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -32,13 +32,17 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - uses: Entepotenz/change-string-case-action@v1 # https://github.com/orgs/community/discussions/10553 + id: repo-uri-string + with: + string: ghcr.io/${{ github.repository }} + - name: Generate image metadata - id: spoticord # used in next step + id: docker-meta # used in next step uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags - images: | - ghcr.io/${{ github.repository }} + images: ${{ steps.repo-uri-string.outputs.lowercase }} # Docker tags based on the following events/attributes tags: | type=raw,value=latest,enable={{is_default_branch}} @@ -55,8 +59,8 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.spoticord.outputs.tags }} - labels: ${{ steps.spoticord.outputs.labels }} + tags: ${{ steps.docker-meta.outputs.tags }} + labels: ${{ steps.docker-meta.outputs.labels }} # Some basic caching of the layers... - cache-from: ghcr.io/${{ github.repository }}:latest-cache - cache-to: ghcr.io/${{ github.repository }}:latest-cache + cache-from: ${{ steps.repo-uri-string.outputs.lowercase }}:latest-cache + cache-to: ${{ steps.repo-uri-string.outputs.lowercase }}:latest-cache From f385a9d5b21437ea183ddb4e91de09487e5228cf Mon Sep 17 00:00:00 2001 From: Tyrone Faulhaber <20131658+spectrapulse@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:23:24 +0200 Subject: [PATCH 4/4] Update build-push.yml --- .github/workflows/build-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 7a216c4..8e143c3 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -32,7 +32,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: Entepotenz/change-string-case-action@v1 # https://github.com/orgs/community/discussions/10553 + - uses: Entepotenz/change-string-case-action-min-dependencies@v1 # https://github.com/orgs/community/discussions/10553 id: repo-uri-string with: string: ghcr.io/${{ github.repository }}