diff --git a/.actrc b/.actrc index fc2d5a8..2a23273 100644 --- a/.actrc +++ b/.actrc @@ -9,3 +9,5 @@ --platform ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04 --platform ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 --platform ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 +--secret-file=.act.secrets +--var-file=.act.vars diff --git a/.github/workflows/docker.build.yml b/.github/workflows/docker.build.yml index a83faca..285804e 100644 --- a/.github/workflows/docker.build.yml +++ b/.github/workflows/docker.build.yml @@ -9,8 +9,7 @@ on: workflow_dispatch: env: - PLATFORMS: linux/amd64,linux/arm64 - CANDIDATE_IMAGE: ghcr.io/benzine-framework/bouncer:build-${{ github.sha }} + PLATFORMS: ${{ var.PLATFORMS }} jobs: docker-build: @@ -21,10 +20,8 @@ jobs: - 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 }} + ghcr_user: ${{ vars.SERVICE_ACCOUNT_USERNAME }} + ghcr_token: ${{ secrets.SERVICE_ACCOUNT_TOKEN }} - name: "Build & Push Candidate Image as ${{ env.CANDIDATE_IMAGE }}" uses: docker/build-push-action@v5 with: @@ -38,6 +35,8 @@ jobs: platforms: ${{ github.actor != 'nektos/act' && env.PLATFORMS || 'linux/amd64' }} pull: true push: ${{ github.ref == 'refs/heads/main' }} - tags: ${{ env.CANDIDATE_IMAGE }} + tags: | + ${{ vars.LOADBALANCER_DOCKER_IMAGE }}:latest + ${{ vars.LOADBALANCER_DOCKER_IMAGE }}:sha-${{ github.sha }} cache-from: ${{ env.DOCKER_CACHE_FROM }} cache-to: ${{ env.DOCKER_CACHE_TO }} diff --git a/.gitignore b/.gitignore index edcef9f..72dede8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /.php-cs-fixer.cache /.github/cache /.secrets +/.act.secrets +/.act.vars diff --git a/Dockerfile b/Dockerfile index d6ea36b..7d74f5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -104,5 +104,5 @@ HEALTHCHECK --start-period=3s --interval=3s \ # checkov:skip=CKV_DOCKER_7 This is a test container. # checkov:skip=CKV_DOCKER_3 This is a test container. -FROM alpine as test-box -RUN apk add --no-cache curl bash \ No newline at end of file +FROM alpine AS test-box +RUN apk add --no-cache curl bash