Skip to content

Commit 8ecf438

Browse files
authored
fix(infra): Fix Superset docker GitHub action (#172)
Refactored Docker image build workflow configuration to improve code clarity by replacing an environment variable with explicit inline image name construction across build and attestation steps, with no impact to functionality.
1 parent de79dee commit 8ecf438

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/docker-superset.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ on:
1010
types: [opened, synchronize, reopened]
1111
paths:
1212
- "infra/container-images/analytics-data-platform-superset/Dockerfile"
13+
- ".github/workflows/docker-superset.yml"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
17+
cancel-in-progress: true
1318

1419
env:
1520
REGISTRY: ghcr.io
1621
ORG_NAME: isisneutronmuon
1722
IMAGE_NAME: analytics-data-platform-superset
18-
FQ_IMAGE_NAME: ${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
1923
PUBLISH: false
2024

2125
jobs:
@@ -29,6 +33,8 @@ jobs:
2933
steps:
3034
- name: Checkout repository
3135
uses: actions/checkout@v5
36+
- name: Compute fully qualified image name
37+
run: echo "FQ_IMAGE_NAME=${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}" >> $GITHUB_ENV
3238
- name: Log in to the Container registry
3339
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
3440
with:
@@ -42,14 +48,14 @@ jobs:
4248
context: infra/container-images/${{ env.IMAGE_NAME }}
4349
push: ${{ env.PUBLISH }}
4450
tags: |
45-
${{ FQ_IMAGE_NAME }}:${{ github.sha }}
46-
${{ FQ_IMAGE_NAME }}:latest
51+
${{ env.FQ_IMAGE_NAME }}:${{ github.sha }}
52+
${{ env.FQ_IMAGE_NAME }}:latest
4753
4854
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built.
4955
# See [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)
5056
- name: Generate artifact attestation
5157
uses: actions/attest-build-provenance@v3
5258
with:
53-
subject-name: ${{ FQ_IMAGE_NAME }}
59+
subject-name: ${{ env.FQ_IMAGE_NAME }}
5460
subject-digest: ${{ steps.push.outputs.digest }}
5561
push-to-registry: ${{ env.PUBLISH }}

infra/container-images/analytics-data-platform-superset/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE=ghcr.io/isisneutronmuon/superset-fork:sha256-1f2019bd5a6ed81902d7c4035f0a363bceb10f60f5d9d98b4784857e2578506e
1+
ARG BASE_IMAGE=ghcr.io/isisneutronmuon/superset-fork:1a7712b054d5cf6f15f815e79eddb6f034a5ae49
22
FROM ${BASE_IMAGE}
33

44
LABEL org.opencontainers.image.source=https://github.com/ISISNeutronMuon/analytics-data-platform

0 commit comments

Comments
 (0)