From 0d0f0d94bfc41cd2942549fe1118d7e36524b5c6 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 14:10:49 -0600 Subject: [PATCH 1/6] use ghcr --- .github/workflows/docker_github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index b566792..02e89ca 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -10,8 +10,8 @@ jobs: - name: Publish to Registry uses: docker/build-push-action@v1 with: - repository: ${{ env.IMAGE_REPOSITORY }}/arma3server + repository: ${{ env.IMAGE_REPOSITORY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - registry: docker.pkg.github.com + registry: ghr.io tag_with_ref: true From 5746042378d0e53fe6b886bd6e58594f3b9e76e9 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 14:22:57 -0600 Subject: [PATCH 2/6] Update docker_github.yml --- .github/workflows/docker_github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index 02e89ca..51703d4 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -8,7 +8,7 @@ jobs: - name: Convert repository name to lower case run: echo IMAGE_REPOSITORY="$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" - name: Publish to Registry - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v2 with: repository: ${{ env.IMAGE_REPOSITORY }} username: ${{ github.actor }} From 72a0fb204cef5b2398d7af86588dca7f7f80e05f Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 14:31:32 -0600 Subject: [PATCH 3/6] Update docker_github.yml --- .github/workflows/docker_github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index 51703d4..c0b66fe 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -13,5 +13,5 @@ jobs: repository: ${{ env.IMAGE_REPOSITORY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - registry: ghr.io + registry: ghcr.io tag_with_ref: true From 39d3144c4514dc4efdeeea280a148fd21d49e415 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 14:47:49 -0600 Subject: [PATCH 4/6] Update docker_github.yml --- .github/workflows/docker_github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index c0b66fe..cd8a363 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -10,7 +10,7 @@ jobs: - name: Publish to Registry uses: docker/build-push-action@v2 with: - repository: ${{ env.IMAGE_REPOSITORY }} + repository: ${{ github.event.repository.name }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io From 8db753fa18f297bd4cee123a6999f8b2717f3dae Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 14:55:35 -0600 Subject: [PATCH 5/6] Update docker_github.yml --- .github/workflows/docker_github.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index cd8a363..039178f 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -15,3 +15,4 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io tag_with_ref: true + push: true From 2853d8e57fa6bdd6957f7e1259304fead08933dc Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 12 Apr 2022 15:18:17 -0600 Subject: [PATCH 6/6] Update docker_github.yml --- .github/workflows/docker_github.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker_github.yml b/.github/workflows/docker_github.yml index 039178f..f9526d2 100644 --- a/.github/workflows/docker_github.yml +++ b/.github/workflows/docker_github.yml @@ -7,12 +7,20 @@ jobs: - uses: actions/checkout@master - name: Convert repository name to lower case run: echo IMAGE_REPOSITORY="$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" - - name: Publish to Registry - uses: docker/build-push-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 with: - repository: ${{ github.event.repository.name }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - tag_with_ref: true + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Get smart tag + id: prepare + uses: Surgo/docker-smart-tag-action@v1 + with: + docker_image: ${{ env.IMAGE_REPOSITORY }} + - name: Build and push + uses: docker/build-push-action@v2 + with: push: true + tags: | + ghcr.io/${{ steps.prepare.outputs.tag }}