fixup build
This commit is contained in:
parent
f9cb1e69de
commit
3675824d44
1 changed files with 21 additions and 55 deletions
76
.github/workflows/swarm-connectivity-tester.yml
vendored
76
.github/workflows/swarm-connectivity-tester.yml
vendored
|
|
@ -17,68 +17,34 @@ concurrency:
|
||||||
group: ${{ github.head_ref || github.run_id }}
|
group: ${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
PLATFORMS: linux/amd64,linux/arm64
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
swarm-connectivity-tester-build:
|
swarm-connectivity-tester-build:
|
||||||
name: Build Swarm Connectivity Tester
|
name: Build Swarm Connectivity Tester
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Setup: Checkout Source"
|
- uses: benzine-framework/action-setup-php@main
|
||||||
uses: actions/checkout@v4
|
- uses: benzine-framework/action-get-datetime@main
|
||||||
|
- uses: benzine-framework/action-setup-docker@main
|
||||||
- name: "Setup: PHP"
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
with:
|
||||||
php-version: 8.2
|
ghcr_user: matthewbaggett
|
||||||
|
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: "Setup: Setup QEMU"
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: "Setup: Expose GitHub Runtime"
|
|
||||||
uses: crazy-max/ghaction-github-runtime@v3
|
|
||||||
|
|
||||||
- name: "Setup: Setup Docker Buildx"
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: "Setup: Login to Docker Hub"
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: matthewbaggett
|
|
||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: "Setup: Login to GHCR"
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: matthewbaggett
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: "Setup: Find Composer Cache Directory"
|
|
||||||
id: composer-cache
|
|
||||||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: "Setup: Composer Cache"
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-swarm-connectivity-tester-composer-${{ hashFiles('**/composer.lock') }}
|
|
||||||
restore-keys: ${{ runner.os }}-swarm-connectivity-tester-composer-
|
|
||||||
|
|
||||||
- name: "Dependencies: Composer Install"
|
|
||||||
run: composer install --ignore-platform-reqs
|
|
||||||
|
|
||||||
- name: "Build: Build & Push Target Image"
|
- name: "Build: Build & Push Target Image"
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: swarm-connectivity-tester
|
context: .
|
||||||
target: connect-target
|
target: connect-target
|
||||||
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
platforms: ${{ github.actor != 'nektos/act' && env.PLATFORMS || 'linux/amd64' }}
|
||||||
pull: true
|
pull: true
|
||||||
push: true
|
push: ${{ github.ref == 'refs/heads/main' }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ !env.ACT && 'benzine/swarm-connectivity-tester:target' || '' }}
|
benzine/swarm-connectivity-tester:target
|
||||||
${{ !env.ACT && 'ghcr.io/benzine-framework/swarm-connectivity-tester:target' || 'ghcr.io/benzine-framework/swarm-connectivity-tester:target-devel' }}
|
ghcr.io/benzine-framework/swarm-connectivity-tester:target
|
||||||
cache-from: ${{ !env.ACT && 'type=gha' || '' }}
|
cache-from: ${{ env.DOCKER_CACHE_FROM }}
|
||||||
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }}
|
cache-to: ${{ env.DOCKER_CACHE_TO }}
|
||||||
build-contexts: |
|
build-contexts: |
|
||||||
php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
|
php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
|
||||||
php:nginx=docker-image://ghcr.io/benzine-framework/php:nginx-8.2
|
php:nginx=docker-image://ghcr.io/benzine-framework/php:nginx-8.2
|
||||||
|
|
@ -88,14 +54,14 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
target: connect-reporter
|
target: connect-reporter
|
||||||
platforms: ${{ !env.ACT && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
|
platforms: ${{ github.actor != 'nektos/act' && env.PLATFORMS || 'linux/amd64' }}
|
||||||
pull: true
|
pull: true
|
||||||
push: true
|
push: ${{ github.ref == 'refs/heads/main' }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ !env.ACT && 'benzine/swarm-connectivity-tester:reporter' || '' }}
|
benzine/swarm-connectivity-tester:reporter
|
||||||
${{ !env.ACT && 'ghcr.io/benzine-framework/swarm-connectivity-tester:reporter' || 'ghcr.io/benzine-framework/swarm-connectivity-tester:reporter-devel' }}
|
ghcr.io/benzine-framework/swarm-connectivity-tester:reporter
|
||||||
cache-from: ${{ !env.ACT && 'type=gha' || '' }}
|
cache-from: ${{ env.DOCKER_CACHE_FROM }}
|
||||||
cache-to: ${{ !env.ACT && 'type=gha,mode=max' || '' }}
|
cache-to: ${{ env.DOCKER_CACHE_TO }}
|
||||||
build-contexts: |
|
build-contexts: |
|
||||||
php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
|
php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
|
||||||
php:nginx=docker-image://ghcr.io/benzine-framework/php:nginx-8.2
|
php:nginx=docker-image://ghcr.io/benzine-framework/php:nginx-8.2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue