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 }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
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
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
build-args: ${{ matrix.build-args }}
|
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: |
|
tags: |
|
||||||
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:nightly${{ matrix.tags-suffix }}
|
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:nightly${{ matrix.tags-suffix }}
|
||||||
${{ env.DH_REGISTRY_NAME }}:nightly${{ matrix.tags-suffix }}
|
${{ env.DH_REGISTRY_NAME }}:nightly${{ matrix.tags-suffix }}
|
||||||
|
|
@ -89,17 +104,18 @@ jobs:
|
||||||
platforms: ${{ matrix.platforms }}
|
platforms: ${{ matrix.platforms }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
- name: Release build and push slim
|
- name: Release build and push from main branch
|
||||||
if: ${{ github.ref_name == 'main' }}
|
if: ${{ (github.ref_name == 'main') && (github.event_name == 'push') }}
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
build-args: ${{ matrix.build-args }}
|
build-args: ${{ matrix.build-args }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
${{ 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 }}
|
${{ env.GHCR }}/${{ env.GHCR_IMAGE_NAME }}:${{ matrix.aliases }}
|
||||||
|
${{ env.DH_REGISTRY_NAME }}:${{ matrix.aliases }}
|
||||||
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 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue