Skip to content

Commit 87f19ff

Browse files
committed
ci: publish-test-deps-image.yml -- align with bootstrap PR #402
Drop the fork-allowance/ci-draft-pause-branch additions so this file matches the version going in via PR #402. After #402 merges to master, this PR's branch will have the identical content -- no merge conflict, no duplicate-but-different file diff to resolve. Reverts the temporary changes from previous commits: - branches: ['master','main','ci-draft-pause'] -> ['master','main'] - aidangarske/wolfProvider repo allowance dropped - per-owner ghcr namespace logic dropped (canonical wolfssl/ only) - concurrency group simplified (no ${{ github.repository }} suffix) If you still want fork-side iteration after #402 merges, do it on the bootstrap branch with workflow_dispatch on the canonical repo; the canonical publish flow is what consumers actually pull from.
1 parent cfda41f commit 87f19ff

1 file changed

Lines changed: 13 additions & 36 deletions

File tree

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,23 @@
11
name: Publish test-deps image
22

33
# Builds docker/wolfprovider-test-deps/Dockerfile and pushes it to
4-
# ghcr.io/<repo-owner>/wolfprovider-test-deps:bookworm.
4+
# ghcr.io/wolfssl/wolfprovider-test-deps:bookworm.
55
#
6-
# Fires on:
7-
# - push to master/main on wolfSSL/wolfProvider (canonical publish)
8-
# - push to any branch on aidangarske/wolfProvider (fork-side
9-
# bootstrap, so PR #400 has an image to point at while iterating)
10-
# - workflow_dispatch (manual fire from either repo)
11-
#
12-
# Pushes to whichever ghcr namespace the runner is in:
13-
# - wolfSSL/wolfProvider -> ghcr.io/wolfssl/wolfprovider-test-deps
14-
# - aidangarske/wolfProvider -> ghcr.io/aidangarske/wolfprovider-test-deps
15-
#
16-
# The consumer workflows (bind9, curl, etc.) hardcode the canonical
17-
# wolfssl namespace, so the fork-side publish is purely for the fork
18-
# owner to validate the build/push pipeline -- not for the PR's
19-
# consumer workflows to use.
6+
# Fires when the Dockerfile (or this workflow file) changes on master.
7+
# The pushed package stays private -- consumer workflows running on
8+
# wolfSSL/wolfProvider use the canonical GITHUB_TOKEN, which has read
9+
# access to the org's private packages.
2010

2111
on:
2212
push:
23-
branches:
24-
- master
25-
- main
26-
- 'ci-draft-pause' # TEMPORARY: PR #400's working branch
13+
branches: [ 'master', 'main' ]
2714
paths:
2815
- 'docker/wolfprovider-test-deps/**'
2916
- '.github/workflows/publish-test-deps-image.yml'
3017
workflow_dispatch: {}
3118

3219
concurrency:
33-
group: publish-test-deps-image-${{ github.repository }}-${{ github.ref }}
20+
group: publish-test-deps-image
3421
cancel-in-progress: false
3522

3623
permissions:
@@ -39,26 +26,16 @@ permissions:
3926

4027
jobs:
4128
publish:
42-
# Only allow the two known-good repos. Refuse to push from any
43-
# other fork to avoid burning runner-minutes building an image
44-
# that nothing will pull.
45-
if: github.repository == 'wolfSSL/wolfProvider' || github.repository == 'aidangarske/wolfProvider'
29+
# Only the canonical repo's runner has a token authorized to push
30+
# to ghcr.io/wolfssl/*. Forks won't have that scope, so skip.
31+
if: github.repository == 'wolfSSL/wolfProvider'
4632
runs-on: ubuntu-22.04
4733
timeout-minutes: 45
48-
env:
49-
IMAGE_OWNER: ${{ github.repository_owner }}
5034
steps:
5135
- uses: actions/checkout@v4
5236
with:
5337
fetch-depth: 1
5438

55-
- name: Compute lowercase image owner
56-
id: owner
57-
run: |
58-
# ghcr.io path components must be lowercase even though the
59-
# GitHub org casing is "wolfSSL".
60-
echo "lc=$(echo "${IMAGE_OWNER}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
61-
6239
- name: Set up Docker Buildx
6340
uses: docker/setup-buildx-action@v3
6441

@@ -76,7 +53,7 @@ jobs:
7653
file: docker/wolfprovider-test-deps/Dockerfile
7754
push: true
7855
tags: |
79-
ghcr.io/${{ steps.owner.outputs.lc }}/wolfprovider-test-deps:bookworm
80-
ghcr.io/${{ steps.owner.outputs.lc }}/wolfprovider-test-deps:bookworm-${{ github.sha }}
81-
cache-from: type=registry,ref=ghcr.io/${{ steps.owner.outputs.lc }}/wolfprovider-test-deps:bookworm
56+
ghcr.io/wolfssl/wolfprovider-test-deps:bookworm
57+
ghcr.io/wolfssl/wolfprovider-test-deps:bookworm-${{ github.sha }}
58+
cache-from: type=registry,ref=ghcr.io/wolfssl/wolfprovider-test-deps:bookworm
8259
cache-to: type=inline

0 commit comments

Comments
 (0)