name: Docker Build and Push on: push: branches: - main - staging jobs: build-and-push: runs-on: - linux - ${{ matrix.arch }} container: image: docker.gitea.com/runner-images:ubuntu-latest strategy: matrix: arch: [amd64, arm64] steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - uses: docker/login-action@v3 with: registry: git.fossy.my.id username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build & Push (main) if: github.ref == 'refs/heads/main' uses: docker/build-push-action@v6 with: context: . push: true tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:latest manifests: | git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:amd64 git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:arm64 - name: Build & Push (staging) if: github.ref == 'refs/heads/staging' uses: docker/build-push-action@v6 with: context: . push: true tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging manifests: | git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:amd64 git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:arm64