feat: add version tag for github release docker

This commit is contained in:
Jun Kurihara 2025-02-01 04:16:41 +09:00
commit 07a49af316
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03

View file

@ -170,6 +170,14 @@ jobs:
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
- name: check pull_request title
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }}
uses: kaisugi/action-regex-match@v1.0.1
id: regex-match
with:
text: ${{ github.event.pull_request.title }}
regex: "^(\\d+\\.\\d+\\.\\d+)$"
- name: Release build and push from main branch - name: Release build and push from main branch
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }} if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' && github.event.pull_request.merged == true }}
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@ -181,6 +189,8 @@ jobs:
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:latest${{ matrix.tags-suffix }} ${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:latest${{ matrix.tags-suffix }}
${{ env.DH_REGISTRY_NAME }}:latest${{ matrix.tags-suffix }} ${{ env.DH_REGISTRY_NAME }}:latest${{ matrix.tags-suffix }}
${{ matrix.aliases }} ${{ matrix.aliases }}
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:${{ github.event.pull_request.title }}${{ matrix.tags-suffix }}
${{ env.DH_REGISTRY_NAME }}:${{ github.event.pull_request.title }}${{ matrix.tags-suffix }}
build-contexts: ${{ matrix.build-contexts }} build-contexts: ${{ matrix.build-contexts }}
file: ${{ matrix.dockerfile }} file: ${{ matrix.dockerfile }}
cache-from: type=gha,scope=rpxy-latest-${{ matrix.target }} cache-from: type=gha,scope=rpxy-latest-${{ matrix.target }}