diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 6066544..f9e549b 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -13,12 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - images: ghcr.io/${{ github.repository }} - - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 @@ -44,9 +38,10 @@ jobs: with: context: . file: ./Dockerfile + builder: ${{ steps.buildx.outputs.name }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache + push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + tags: ghcr.io/${{ github.repository }}:${{ github.sha }},ghcr.io/${{ github.repository }}:latest diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 7adad85..8ab5f81 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -50,9 +50,11 @@ jobs: with: context: . file: ./Dockerfile + builder: ${{ steps.buildx.outputs.name }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}