diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index a9cc6c5..fa6c14b 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -11,8 +11,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - + uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + ptorstensson/aw-gateway-rs + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -25,6 +35,10 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PSW }} - - name: Build & Push Image - run: | - docker buildx build --push --platform linux/amd64,linux/arm64 --tag ptorstensson/aw-gateway-rs:dev --tag ptorstensson/aw-gateway-rs:$(date +%s) . + - name: Build and Push Image + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true \ No newline at end of file