Skip to content

Commit

Permalink
Correctly populate the buildurl
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Dec 4, 2024
1 parent 9a90648 commit 45f558e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,47 @@ on: [ push, workflow_dispatch ]
jobs:
setup:
runs-on: ubuntu-latest

outputs:
build_url: ${{ steps.data.outputs.build_url }}

steps:
- name: Set and debug environment variables
- id: data
name: Populates outputs
run: |
JOB_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "JOB_URL=$JOB_URL" >> "$GITHUB_ENV"
env | sort
echo "build_url=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" >> "$GITHUB_OUTPUT"
build:
if: github.event_name != 'release'

needs: setup

permissions:
packages: write
contents: read

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Docker meta
- name: Construct image tags and labels
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/berkeleylibrary/geodata
labels: |
edu.berkeley.lib.build-timestamp=${{ github.event.repository.updated_at }}
edu.berkeley.lib.build-url=${{ env.JOB_URL }}
edu.berkeley.lib.build-url=${{ needs.setup.outputs.build_url }}
edu.berkeley.lib.git-ref-name=${{ github.ref_name }}
edu.berkeley.lib.git-repository-url=${{ github.repositoryUrl }}
edu.berkeley.lib.git-sha=${{ github.sha }}
Expand All @@ -60,7 +64,7 @@ jobs:
push: false
build-args: |
BUILD_TIMESTAMP=${{ github.event.repository.updated_at }}
BUILD_URL=${{ env.JOB_URL }}
BUILD_URL=${{ needs.setup.outputs.build_url }}
GIT_REF_NAME=${{ github.ref_name }}
GIT_REPOSITORY_URL=${{ github.repositoryUrl }}
GIT_SHA=${{ github.sha }}
Expand Down

0 comments on commit 45f558e

Please sign in to comment.