This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated file. DO NOT EDIT. | |
'on': | |
push: | |
paths: | |
- scenario-server/** | |
- .github/workflows/scenario-server.yaml | |
pull_request: | |
paths: | |
- scenario-server/** | |
- .github/workflows/scenario-server.yaml | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: '20' | |
cache: sbt | |
- uses: sbt/setup-sbt@v1 | |
- run: sbt test | |
working-directory: scenario-server | |
build-and-push-amd64: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: |- | |
type=sha,suffix=-amd64 | |
type=raw,value=latest-amd64,enable={{is_default_branch}} | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64 | |
context: scenario-server | |
file: scenario-server/Dockerfile-amd64 | |
push: ${{ github.actor == github.repository_owner }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
needs: test | |
build-and-push-aarch64: | |
runs-on: ubuntu-24.04-arm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: |- | |
type=sha,suffix=-aarch64 | |
type=raw,value=latest-aarch64,enable={{is_default_branch}} | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/arm64/v8 | |
context: scenario-server | |
file: scenario-server/Dockerfile-aarch64 | |
push: ${{ github.actor == github.repository_owner }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
needs: test | |
create-manifests: | |
runs-on: ubuntu-24.04 | |
if: ${{ github.actor == github.repository_owner && github.ref == 'refs/heads/main'}} | |
steps: | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/${{ github.repository }} | |
tags: type=sha | |
- uses: docker/setup-buildx-action@v3 | |
- run: |- | |
docker buildx imagetools create \ | |
-t ghcr.io/${{ github.repository }}:latest \ | |
ghcr.io/${{ github.repository }}:latest-amd64 ghcr.io/${{ github.repository }}:latest-aarch64 | |
needs: | |
- build-and-push-amd64 | |
- build-and-push-aarch64 |