Rework triggers again.
This commit is contained in:
parent
719e38385f
commit
724c44f89e
3 changed files with 54 additions and 3 deletions
.github/workflows
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
|
@ -16,26 +16,37 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build-container:
|
||||
name: Build
|
||||
uses: ./.github/workflows/docker.build.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
check-php:
|
||||
name: PHP QC
|
||||
uses: ./.github/workflows/php.check.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
check-trunk:
|
||||
name: Trunk QC
|
||||
uses: ./.github/workflows/trunk.check.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
checks: write
|
||||
validate-container:
|
||||
name: Validate
|
||||
uses: ./.github/workflows/docker.validate.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
release-container:
|
||||
name: Release
|
||||
needs:
|
||||
- build-container
|
||||
- validate-container
|
||||
- check-php
|
||||
- check-trunk
|
||||
uses: ./.github/workflows/docker.release.yml
|
||||
|
@ -43,3 +54,11 @@ jobs:
|
|||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
clean-container:
|
||||
name: Clean
|
||||
needs:
|
||||
- release-container
|
||||
uses: ./.github/workflows/docker.clean.yml
|
||||
secrets: inherit
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
32
.github/workflows/docker.clean.yml
vendored
Normal file
32
.github/workflows/docker.clean.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: "Build: Cleanup Residue"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: ["Build Swarm Loadbalancer"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
CANDIDATE_IMAGE: ghcr.io/benzine-framework/bouncer:build-${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
cleanup-delete-candidate-image:
|
||||
name: Run Trivy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: benzine-framework/action-setup-docker@main
|
||||
with:
|
||||
ghcr_user: ${{ github.repository_owner }}
|
||||
ghcr_token: ${{ secrets.GHCR_TOKEN }}
|
||||
- uses: bots-house/ghcr-delete-image-action@v1.1.0
|
||||
with:
|
||||
owner: ${{ github.repository_owner }}
|
||||
name: ${{ github.event.repository.name }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: build-${{ github.sha }}
|
6
.github/workflows/docker.release.yml
vendored
6
.github/workflows/docker.release.yml
vendored
|
@ -15,7 +15,7 @@ env:
|
|||
|
||||
jobs:
|
||||
release:
|
||||
name: Release Swarm Loadbalancer
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -24,14 +24,14 @@ jobs:
|
|||
- docker
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: "Pull Candidate Image"
|
||||
run: docker pull ${{ env.CANDIDATE_IMAGE }}
|
||||
- uses: benzine-framework/action-setup-docker@main
|
||||
with:
|
||||
ghcr_user: ${{ github.repository_owner }}
|
||||
ghcr_token: ${{ secrets.GHCR_TOKEN }}
|
||||
docker_hub_user: ${{ secrets.DOCKER_HUB_USER }}
|
||||
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
- name: "Pull Candidate Image"
|
||||
run: docker pull ${{ env.CANDIDATE_IMAGE }}
|
||||
- name: "Login to GHCR"
|
||||
if: matrix.registry == 'ghcr'
|
||||
run: docker login ghcr.io -u matthewbaggett -p ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
Loading…
Reference in a new issue