Skip to content

Commit 5ba5f4a

Browse files
authored
Merge pull request #7742 from freedomofpress/enp/update-ci
Update image build automation to drop redundant tag prep jobs
2 parents e382a6b + 6ff43a9 commit 5ba5f4a

File tree

2 files changed

+2
-48
lines changed

2 files changed

+2
-48
lines changed

.github/workflows/demo-landing.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,17 @@ on:
88
- devops/demo/landing-page/**
99

1010
jobs:
11-
prepare:
12-
name: Prepare
13-
runs-on: ubuntu-latest
14-
permissions:
15-
contents: read
16-
actions: read
17-
steps:
18-
- name: Determine tags
19-
id: tags
20-
env:
21-
REF: ${{ github.ref_name }}
22-
SHA: ${{ github.sha }}
23-
# So annoying that GHA doesn't have a builtin substring
24-
# function (or expose the shortened SHA). If it did then
25-
# we could drop this whole job and just set it as a statically
26-
# templated value in the build job.
27-
run: |
28-
echo "tags=$REF;$REF-${SHA:0:7}" >>$GITHUB_OUTPUT
29-
outputs:
30-
tags: ${{ steps.tags.outputs.tags }}
31-
3211
build:
3312
name: Build Landing Page
3413
uses: freedomofpress/actionslib/.github/workflows/oci-build.yaml@main
35-
needs:
36-
- prepare
3714
permissions:
3815
contents: read
3916
actions: read
4017
packages: write
4118
with:
4219
context: "."
4320
containerfile: devops/demo/landing-page/Dockerfile
44-
tags: ${{ needs.prepare.outputs.tags }}
4521
registry: ghcr.io/freedomofpress/securedrop-demo-landing-page
22+
add-branch-tags: true
4623
secrets:
4724
registry-password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/demo-publish.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,9 @@ on:
77
tags: ["**"] # run for all tags
88

99
jobs:
10-
prepare:
11-
name: Prepare
12-
runs-on: ubuntu-latest
13-
permissions:
14-
contents: read
15-
actions: read
16-
steps:
17-
- name: Determine tags
18-
id: tags
19-
env:
20-
REF: ${{ github.ref_name }}
21-
SHA: ${{ github.sha }}
22-
# So annoying that GHA doesn't have a builtin substring
23-
# function (or expose the shortened SHA). If it did then
24-
# we could drop this whole job and just set it as a statically
25-
# templated value in the build job.
26-
run: |
27-
echo "tags=$REF;$REF-${SHA:0:7}" >>$GITHUB_OUTPUT
28-
outputs:
29-
tags: ${{ steps.tags.outputs.tags }}
30-
3110
build:
3211
name: Build
3312
uses: freedomofpress/actionslib/.github/workflows/oci-build.yaml@main
34-
needs:
35-
- prepare
3613
strategy:
3714
matrix:
3815
debian:
@@ -44,7 +21,7 @@ jobs:
4421
with:
4522
context: "."
4623
containerfile: securedrop/dockerfiles/${{ matrix.debian }}/python3/DemoDockerfile
47-
tags: ${{ needs.prepare.outputs.tags }}
4824
registry: ghcr.io/freedomofpress/securedrop-demo-${{ matrix.debian }}
25+
add-branch-tags: true
4926
secrets:
5027
registry-password: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)