From 86e66eb6a0474305aab0a66ac5f538cb2278c9f7 Mon Sep 17 00:00:00 2001 From: Dedy Martadinata S Date: Fri, 8 Apr 2022 19:08:01 +0700 Subject: [PATCH] combine-tags --- .github/workflows/docker-build-push.yml | 86 +++++-------------------- 1 file changed, 16 insertions(+), 70 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 88f7e484..95249315 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -28,6 +28,13 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: $GITHUB_REPOSITORY_OWNER + password: ${{ secrets.GH_TOKEN }} - name: Build and Push Client Image uses: docker/build-push-action@v2.10.0 @@ -39,6 +46,8 @@ jobs: tags: | amruthpillai/reactive-resume:client-latest amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} + ghcr.io/amruthpillai/reactive-resume:client-latest + ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} docker_server: name: Docker (Server) @@ -63,6 +72,13 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: $GITHUB_REPOSITORY_OWNER + password: ${{ secrets.GH_TOKEN }} - name: Build and Push Server Image uses: docker/build-push-action@v2.10.0 @@ -74,75 +90,5 @@ jobs: tags: | amruthpillai/reactive-resume:server-latest amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} - - github_client: - name: GitHub (Client) - runs-on: ubuntu-latest - - steps: - - name: Checkout the repository - uses: actions/checkout@v3.0.0 - - - id: version - name: Get Version - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1.14.1 - with: - registry: ghcr.io - username: $GITHUB_REPOSITORY_OWNER - password: ${{ secrets.GH_TOKEN }} - - - name: Build and Push Client Image - uses: docker/build-push-action@v2.10.0 - with: - context: . - push: true - file: client/Dockerfile - platforms: linux/amd64,linux/arm64 - tags: | - ghcr.io/amruthpillai/reactive-resume:client-latest - ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} - - github_server: - name: GitHub (Server) - runs-on: ubuntu-latest - - steps: - - name: Checkout the repository - uses: actions/checkout@v3.0.0 - - - id: version - name: Get Version - run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v1.14.1 - with: - registry: ghcr.io - username: $GITHUB_REPOSITORY_OWNER - password: ${{ secrets.GH_TOKEN }} - - - name: Build and Push Server Image - uses: docker/build-push-action@v2.10.0 - with: - context: . - push: true - file: server/Dockerfile - platforms: linux/amd64,linux/arm64 - tags: | ghcr.io/amruthpillai/reactive-resume:server-latest ghcr.io/amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }}