Skip to content

Commit

Permalink
Use local environment variable declaration (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
duckfullstop committed Jan 18, 2025
1 parent 85cebe2 commit 1cdd254
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ jobs:
org.opencontainers.image.url=https://github.com/ropenttd/docker_openttd
org.opencontainers.image.source=https://github.com/openttd/openttd
org.opencontainers.image.vendor=Reddit OpenTTD
org.opencontainers.image.version=${{ env.version }}
org.opencontainers.image.version=$version
tags: |
${{ env.version }}-${{ matrix.arch.label }}
$version-${{ matrix.arch.label }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -107,7 +107,7 @@ jobs:
context: .
file: ./Dockerfile
build-args: |
OPENTTD_VERSION=${{ env.version }}
OPENTTD_VERSION=$version
platforms: ${{ matrix.arch.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down Expand Up @@ -155,30 +155,30 @@ jobs:
uses: Noelware/docker-manifest-action@0.4.2
if: matrix.train == 'stable' && matrix.container_store == 'ghcr'
with:
inputs: ${{env.GHCR_REPO}}:latest,${{env.GHCR_REPO}}:stable,${{env.GHCR_REPO}}:${{env.version}},${{env.GHCR_REPO}}:${{env.semver_major}}
images: ${{env.GHCR_REPO}}:${{env.version}}-linux-amd64,${{env.GHCR_REPO}}:${{env.version}}-linux-arm64
inputs: ${{env.GHCR_REPO}}:latest,${{env.GHCR_REPO}}:stable,${{env.GHCR_REPO}}:$version,${{env.GHCR_REPO}}:$semver_major
images: ${{env.GHCR_REPO}}:$version-linux-amd64,${{env.GHCR_REPO}}:$version-linux-arm64
push: true

- name: Create and push manifest (GHCR, testing)
uses: Noelware/docker-manifest-action@0.4.2
if: matrix.train == 'testing' && matrix.container_store == 'ghcr'
with:
inputs: ${{env.GHCR_REPO}}:testing,${{env.GHCR_REPO}}:${{env.version}}
images: ${{env.GHCR_REPO}}:${{env.version}}-linux-amd64,${{env.GHCR_REPO}}:${{env.version}}-linux-arm64
inputs: ${{env.GHCR_REPO}}:testing,${{env.GHCR_REPO}}:$version
images: ${{env.GHCR_REPO}}:$version-linux-amd64,${{env.GHCR_REPO}}:$version-linux-arm64
push: true

- name: Create and push manifest (Docker, stable)
uses: Noelware/docker-manifest-action@0.4.2
if: matrix.train == 'stable' && matrix.container_store == 'docker'
with:
inputs: ${{env.DOCKER_REPO}}:latest,${{env.DOCKER_REPO}}:stable,${{env.DOCKER_REPO}}:${{env.version}},${{env.DOCKER_REPO}}:${{ env.semver_major }}
images: ${{env.DOCKER_REPO}}:${{env.version}}-linux-amd64,${{env.DOCKER_REPO}}:${{env.version}}-linux-arm64
inputs: ${{env.DOCKER_REPO}}:latest,${{env.DOCKER_REPO}}:stable,${{env.DOCKER_REPO}}:$version,${{env.DOCKER_REPO}}:${{ env.semver_major }}
images: ${{env.DOCKER_REPO}}:$version-linux-amd64,${{env.DOCKER_REPO}}:$version-linux-arm64
push: true

- name: Create and push manifest (Docker, testing)
uses: Noelware/docker-manifest-action@0.4.2
if: matrix.train == 'testing' && matrix.container_store == 'docker'
with:
inputs: ${{env.DOCKER_REPO}}:testing,${{env.DOCKER_REPO}}:${{env.version}}
images: ${{env.DOCKER_REPO}}:${{env.version}}-linux-amd64,${{env.DOCKER_REPO}}:${{env.version}}-linux-arm64
inputs: ${{env.DOCKER_REPO}}:testing,${{env.DOCKER_REPO}}:$version
images: ${{env.DOCKER_REPO}}:$version-linux-amd64,${{env.DOCKER_REPO}}:$version-linux-arm64
push: true

0 comments on commit 1cdd254

Please sign in to comment.