name: Continuous Integration

on:
  pull_request:
    branches: 
    - main
  push:
    branches:
      - main
    tags:
      - v*

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Prepare
        id: prepare
        run: |
            TAG=${GITHUB_REF##*/}
            echo ::set-output name=tag_name::${TAG}
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login do docker.io
        if: startsWith(github.ref, 'refs/tags/')
        run: docker login -u navicore -p ${{ secrets.DOCKER_TOKEN }}
      - name: build and publish image
        if: startsWith(github.ref, 'refs/tags/')
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          platforms: linux/amd64,linux/arm64
          push: ${{ startsWith(github.ref, 'refs/tags/') }}
          tags: |
            navicore/teams-notification-resource:${{ steps.prepare.outputs.tag_name }}
            navicore/teams-notification-resource:latest

name: Continuous Integration

on:
  pull_request:
    branches: 
    - main
  push:
    branches:
      - main
    tags:
      - v*

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Prepare
        id: prepare
        run: |
            TAG=${GITHUB_REF##*/}
            echo ::set-output name=tag_name::${TAG}
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login do docker.io
        if: startsWith(github.ref, 'refs/tags/')
        run: docker login -u navicore -p ${{ secrets.DOCKER_TOKEN }}
      - name: build and publish image
        if: startsWith(github.ref, 'refs/tags/')
        id: docker_build
        uses: docker/build-push-action@v3
        with:
          context: .
          file: ./Dockerfile
          platforms: linux/amd64,linux/arm64
          push: ${{ startsWith(github.ref, 'refs/tags/') }}
          tags: |
            navicore/teams-notification-resource:${{ steps.prepare.outputs.tag_name }}
            navicore/teams-notification-resource:latest

Update docker/build-push-action action to v3
Update docker/build-push-action action to v3