|
21 | 21 | password: ${{ secrets.CR_PAT }} |
22 | 22 | - name: Set version |
23 | 23 | run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
24 | | - - name: Build and push |
25 | | - id: docker_build |
26 | | - uses: docker/build-push-action@v2 |
| 24 | + - name: Docker metadata |
| 25 | + id: meta |
| 26 | + uses: docker/metadata-action@v4 |
| 27 | + with: |
| 28 | + images: | |
| 29 | + ghcr.io/${{ github.repository_owner }}/void-updates |
| 30 | + tags: | |
| 31 | + type=sha,prefix= |
| 32 | + type=raw,value=latest |
| 33 | + type=raw,value=${{env.RELEASE_VERSION}},priority=1000 |
| 34 | + flavor: latest=false |
| 35 | + labels: | |
| 36 | + org.opencontainers.image.authors=Void Linux team and contributors |
| 37 | + org.opencontainers.image.url=https://voidlinux.org |
| 38 | + org.opencontainers.image.source=https://github.com/${{ github.repository }} |
| 39 | + org.opencontainers.image.vendor=Void Linux |
| 40 | + org.opencontainers.image.title=void-updates |
| 41 | + org.opencontainers.image.description=Update check system for void-packages |
| 42 | +
|
| 43 | + - name: Set up QEMU |
| 44 | + uses: docker/setup-qemu-action@v2 |
| 45 | + |
| 46 | + - name: Set up Docker Buildx |
| 47 | + uses: docker/setup-buildx-action@v2 |
| 48 | + |
| 49 | + - name: Login to GCHR |
| 50 | + uses: docker/login-action@v2 |
| 51 | + with: |
| 52 | + registry: ghcr.io |
| 53 | + username: ${{ github.actor }} |
| 54 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + |
| 56 | + - name: Build and push images |
| 57 | + id: build_and_push |
| 58 | + uses: docker/bake-action@v3 |
27 | 59 | with: |
28 | 60 | push: true |
29 | | - tags: "ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }}" |
| 61 | + targets: void-updates |
| 62 | + files: | |
| 63 | + services/pkg/docker-bake.hcl |
| 64 | + ${{ steps.meta.outputs.bake-file }} |
| 65 | + set: | |
| 66 | + _common.cache-to=type=gha |
| 67 | + _common.cache-from=type=gha |
0 commit comments