feat: update github actions
This commit is contained in:
parent
65e868893a
commit
2893d94ce7
1 changed files with 22 additions and 6 deletions
28
.github/workflows/docker_build_push.yml
vendored
28
.github/workflows/docker_build_push.yml
vendored
|
|
@ -73,12 +73,27 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Nightly build and push
|
||||
- name: Nightly build test on amd64 for pull requests
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
build-args: ${{ matrix.build-args }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: false
|
||||
build-contexts: ${{ matrix.build-contexts }}
|
||||
file: ${{ matrix.dockerfile }}
|
||||
cache-from: type=gha,scope=rpxy-nightly-${{ matrix.target }}
|
||||
cache-to: type=gha,mode=max,scope=rpxy-nightly-${{ matrix.target }}
|
||||
platforms: linux/amd64
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Nightly build and push from develop branch
|
||||
if: ${{ (github.ref_name == 'develop') && (github.event_name == 'push') }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
build-args: ${{ matrix.build-args }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:nightly${{ matrix.tags-suffix }}
|
||||
${{ env.DH_REGISTRY_NAME }}:nightly${{ matrix.tags-suffix }}
|
||||
|
|
@ -89,17 +104,18 @@ jobs:
|
|||
platforms: ${{ matrix.platforms }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Release build and push slim
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
- name: Release build and push from main branch
|
||||
if: ${{ (github.ref_name == 'main') && (github.event_name == 'push') }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
build-args: ${{ matrix.build-args }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:latest${{ matrix.tags-suffix }}
|
||||
${{ env.DH_REGISTRY_NAME }}:latest${{ matrix.tags-suffix }}
|
||||
${{ matrix.aliases }}
|
||||
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:${{ matrix.aliases }}
|
||||
${{ env.DH_REGISTRY_NAME }}:${{ matrix.aliases }}
|
||||
build-contexts: ${{ matrix.build-contexts }}
|
||||
file: ${{ matrix.dockerfile }}
|
||||
cache-from: type=gha,scope=rpxy-latest-${{ matrix.target }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue