diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index 130d1e9..95468f0 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -49,4 +49,27 @@ jobs: push: true context: . file: ./docker/golang.Dockerfile - tags: ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:latest-arm, ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm \ No newline at end of file + tags: ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:latest-arm, ${{ secrets.REGISTRY_USERNAME }}/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm + + merge-manifest: + if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + needs: [build-and-push-amd, build-and-push-arm] + steps: + - name: Login Registry + uses: docker/login-action@v3 + with: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Create Latest Manifest + run: | + docker buildx imagetools create -t aldinokemal2104/go-whatsapp-web-multidevice:latest \ + aldinokemal2104/go-whatsapp-web-multidevice:latest-amd \ + aldinokemal2104/go-whatsapp-web-multidevice:latest-arm + - name: Create Versioned Manifest (${{ github.ref_name }}) + run: | + docker buildx imagetools create -t aldinokemal2104/go-whatsapp-web-multidevice:${{ github.ref_name }} \ + aldinokemal2104/go-whatsapp-web-multidevice:${{ github.ref_name }}-amd \ + aldinokemal2104/go-whatsapp-web-multidevice:${{ github.ref_name }}-arm \ No newline at end of file