Add tag builder
This commit is contained in:
parent
2d248e66e6
commit
c34220a55c
2 changed files with 52 additions and 0 deletions
1
.actrc
1
.actrc
|
@ -1,3 +1,4 @@
|
|||
--pull=false
|
||||
--use-new-action-cache
|
||||
--action-cache-path=.github/cache/act/actions
|
||||
--cache-server-path=.github/cache/act/cache
|
||||
|
|
51
.github/workflows/tag.release.yml
vendored
Normal file
51
.github/workflows/tag.release.yml
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
name: "Build: Tagged Release"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
env:
|
||||
PLATFORMS: linux/amd64,linux/arm64
|
||||
TAG_IMAGE_GHCR: ghcr.io/benzine-framework/bouncer:${{ github.ref_name }}
|
||||
TAG_IMAGE_DOCKER: benzine/bouncer:${{ github.ref_name }}
|
||||
|
||||
jobs:
|
||||
build-tagged-release:
|
||||
name: Build Swarm Load Balancer
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- run: echo "Building Tagged Release ${{ env.TAG_IMAGE_GHCR }} & ${{ env.TAG_IMAGE_DOCKER }}"
|
||||
- uses: benzine-framework/action-setup-php@main
|
||||
- uses: benzine-framework/action-get-datetime@main
|
||||
- uses: benzine-framework/action-setup-docker@main
|
||||
with:
|
||||
ghcr_user: matthewbaggett
|
||||
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
docker_hub_user: matthewbaggett
|
||||
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
- name: "Build & Push Candidate Image as ${{ env.CANDIDATE_IMAGE }}"
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
target: bouncer
|
||||
build-contexts: |
|
||||
php:cli=docker-image://ghcr.io/benzine-framework/php:cli-${{ env.PHP_VERSION }}
|
||||
build-args: |
|
||||
GIT_SHA=${{ github.sha }}
|
||||
GIT_BUILD_ID=${{ github.ref_name }}
|
||||
GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }}
|
||||
BUILD_DATE=${{ env.ATOM }}
|
||||
platforms: ${{ github.actor != 'nektos/act' && env.PLATFORMS || 'linux/amd64' }}
|
||||
pull: true
|
||||
push: false
|
||||
tags: |
|
||||
${{ env.TAG_IMAGE_GHCR }}
|
||||
${{ env.TAG_IMAGE_DOCKER }}
|
||||
cache-from: ${{ env.DOCKER_CACHE_FROM }}
|
||||
cache-to: ${{ env.DOCKER_CACHE_TO }}
|
Loading…
Reference in a new issue