Set a default for runs-on when not overriden by var.

This commit is contained in:
Greyscale 2024-08-01 18:44:27 +02:00
parent 2de76947b8
commit 0e0bae3500
10 changed files with 15 additions and 15 deletions

View file

@ -15,7 +15,7 @@ env:
jobs:
docker-build:
name: Build Swarm Load Balancer
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- uses: benzine-framework/action-setup-php@main
- uses: benzine-framework/action-get-datetime@main

View file

@ -15,7 +15,7 @@ on:
jobs:
cleanup-delete-candidate-image:
name: Delete candidate image
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- uses: vlaurin/action-ghcr-prune@v0.6.0
@ -30,7 +30,7 @@ jobs:
cleanup-untagged-images:
name: Delete untagged images
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- uses: vlaurin/action-ghcr-prune@v0.6.0

View file

@ -15,7 +15,7 @@ env:
jobs:
release-ghcr:
name: GitHub Container Registry
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ vars.SERVICE_ACCOUNT_USERNAME }} -p ${{ secrets.SERVICE_ACCOUNT_TOKEN }}
- run: docker pull ${{ env.CANDIDATE_IMAGE }}

View file

@ -18,7 +18,7 @@ env:
jobs:
validate-install-report:
name: Run Install Report
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- name: "Pull Candidate Image"
@ -27,7 +27,7 @@ jobs:
run: docker run --rm ${{ env.CANDIDATE_IMAGE }} /usr/bin/install-report
validate-dive-report:
name: Run Dive
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- name: "Pull Candidate Image"
@ -48,7 +48,7 @@ jobs:
config-file: ${{ github.workspace }}/.dive-ci.yml
validate-vulnerability-report:
name: Run Trivy
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- name: "Pull Candidate Image"

View file

@ -10,7 +10,7 @@ on:
jobs:
php-stan:
name: PHPStan
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
permissions:
checks: write # To post annotations
contents: read # For repo checkout
@ -20,7 +20,7 @@ jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout

View file

@ -17,7 +17,7 @@ env:
jobs:
build-tagged-release:
name: Build Swarm Load Balancer
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.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 }}"

View file

@ -10,7 +10,7 @@ on:
jobs:
test-integration:
name: Integration Tests
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- name: Start Loadbalancer
@ -37,7 +37,7 @@ jobs:
shell: bash
run: |
set -xeu
docker compose exec test-box curl -s -D - http://b.example.org 2>&1 > b.nossl.http
docker compose exec test-box curl -s -D - http://b.example.org 2>&1 > b.nossl.http
grep "HTTP/1.1 200 OK" b.nossl.http
grep "<h1>Website B</h1>" b.nossl.http
- name: SSL Connect to Web B

View file

@ -22,7 +22,7 @@ concurrency:
jobs:
trunk-cache:
name: Trunk Cache
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
permissions:
actions: write
steps:

View file

@ -10,7 +10,7 @@ on:
jobs:
trunk-check:
name: Trunk Check Runner
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout

View file

@ -20,7 +20,7 @@ concurrency:
jobs:
trunk-upgrade:
name: Upgrade Trunk
runs-on: ${{ vars.RUNS_ON }}
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
permissions:
contents: write # For trunk to create PRs
pull-requests: write # For trunk to create PRs