diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index fcea52c..a9d66cd 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -12,20 +12,28 @@ env: jobs: docker: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Build/Publish Image - uses: mobilecoinofficial/gh-actions/docker@v0 - with: - dockerfile: ./Dockerfile - flavor: latest=true - images: ireshmm/gha-runner - password: ${{ secrets.DOCKERHUB_TOKEN }} - push: ${{ github.event_name == 'pull_request' && 'false' || 'true' }} - tags: | - type=semver,pattern={{version}},priority=20 - type=sha,priority=10 - username: ${{ secrets.DOCKERHUB_USERNAME }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ireshmm/gha-runner + tags: | + type=semver,pattern={{version}},priority=20 + type=sha,priority=10 + - + name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ steps.meta.outputs.tags }}