Skip to content

Commit 45f558e

Browse files
Correctly populate the buildurl
1 parent 9a90648 commit 45f558e

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,47 @@ on: [ push, workflow_dispatch ]
55
jobs:
66
setup:
77
runs-on: ubuntu-latest
8+
9+
outputs:
10+
build_url: ${{ steps.data.outputs.build_url }}
11+
812
steps:
9-
- name: Set and debug environment variables
13+
- id: data
14+
name: Populates outputs
1015
run: |
11-
JOB_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
12-
echo "JOB_URL=$JOB_URL" >> "$GITHUB_ENV"
13-
14-
env | sort
16+
echo "build_url=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" >> "$GITHUB_OUTPUT"
1517
1618
build:
1719
if: github.event_name != 'release'
1820

21+
needs: setup
22+
1923
permissions:
2024
packages: write
2125
contents: read
2226

2327
runs-on: ubuntu-latest
2428

2529
strategy:
30+
fail-fast: false
2631
matrix:
2732
platform:
2833
- linux/amd64
2934
- linux/arm64
30-
fail-fast: false
3135

3236
steps:
3337
- name: Checkout repository
3438
uses: actions/checkout@v3
3539

36-
- name: Docker meta
40+
- name: Construct image tags and labels
3741
id: meta
3842
uses: docker/metadata-action@v5
3943
with:
4044
images: |
4145
ghcr.io/berkeleylibrary/geodata
4246
labels: |
4347
edu.berkeley.lib.build-timestamp=${{ github.event.repository.updated_at }}
44-
edu.berkeley.lib.build-url=${{ env.JOB_URL }}
48+
edu.berkeley.lib.build-url=${{ needs.setup.outputs.build_url }}
4549
edu.berkeley.lib.git-ref-name=${{ github.ref_name }}
4650
edu.berkeley.lib.git-repository-url=${{ github.repositoryUrl }}
4751
edu.berkeley.lib.git-sha=${{ github.sha }}
@@ -60,7 +64,7 @@ jobs:
6064
push: false
6165
build-args: |
6266
BUILD_TIMESTAMP=${{ github.event.repository.updated_at }}
63-
BUILD_URL=${{ env.JOB_URL }}
67+
BUILD_URL=${{ needs.setup.outputs.build_url }}
6468
GIT_REF_NAME=${{ github.ref_name }}
6569
GIT_REPOSITORY_URL=${{ github.repositoryUrl }}
6670
GIT_SHA=${{ github.sha }}

0 commit comments

Comments
 (0)