From 5cfae11de2f4b755d670231f328ffbfbcd262738 Mon Sep 17 00:00:00 2001 From: SilverFire - Dmitry Naumenko Date: Fri, 22 Apr 2022 14:48:44 +0300 Subject: [PATCH] Change github workflow to push a forked image --- .github/workflows/dockerhub.yml | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 706d298..7a10f84 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - + - name: Retrieve version run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV @@ -36,13 +36,11 @@ jobs: uses: docker/metadata-action@v3 with: images: | - ghcr.io/nginx-proxy/nginx-proxy - nginxproxy/nginx-proxy - jwilder/nginx-proxy + hiqdev/nginx-proxy tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} labels: | org.opencontainers.image.authors=Nicolas Duchon (@buchdag), Jason Wilder org.opencontainers.image.version=${{ env.GIT_DESCRIBE }} @@ -54,17 +52,10 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push the Debian based image id: docker_build_debian @@ -89,7 +80,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - + - name: Retrieve version run: echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV @@ -98,13 +89,11 @@ jobs: uses: docker/metadata-action@v3 with: images: | - ghcr.io/nginx-proxy/nginx-proxy - nginxproxy/nginx-proxy - jwilder/nginx-proxy + hiqdev/nginx-proxy tags: | type=semver,suffix=-alpine,pattern={{version}} type=semver,suffix=-alpine,pattern={{major}}.{{minor}} - type=raw,value=alpine,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=alpine,enable=${{ github.ref == 'refs/heads/master' }} labels: | org.opencontainers.image.authors=Nicolas Duchon (@buchdag), Jason Wilder org.opencontainers.image.version=${{ env.GIT_DESCRIBE }} @@ -121,13 +110,6 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push the Alpine based image id: docker_build_alpine