Skip to content

Commit 936b810

Browse files
authored
Merge pull request #3507 from reubenmiller/ci-control-publish-repo
ci: allow projects to control where the packages are published to using secrets
2 parents 4f72857 + 8a3f30f commit 936b810

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

.github/workflows/build-workflow.yml

+15-13
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,18 @@ jobs:
269269
fail-fast: false
270270
matrix:
271271
job:
272-
- { target: x86_64-unknown-linux-musl, repo: tedge-main, component: main }
273-
- { target: aarch64-unknown-linux-musl, repo: tedge-main, component: main }
272+
- { target: x86_64-unknown-linux-musl, repo_suffix: '', component: main }
273+
- { target: aarch64-unknown-linux-musl, repo_suffix: '', component: main }
274274
# Keep arm-unknown-linux-musleabi in separate repo due to armhf conflict between raspbian and debian
275-
- { target: arm-unknown-linux-musleabi, repo: tedge-main-armv6, component: main }
276-
- { target: armv7-unknown-linux-musleabihf, repo: tedge-main, component: main }
277-
- { target: arm-unknown-linux-musleabi, repo: tedge-main, component: main }
278-
- { target: i686-unknown-linux-musl, repo: tedge-main, component: main }
275+
- { target: arm-unknown-linux-musleabi, repo_suffix: '-armv6', component: main }
276+
- { target: armv7-unknown-linux-musleabihf, repo_suffix: '', component: main }
277+
- { target: arm-unknown-linux-musleabi, repo_suffix: '', component: main }
278+
- { target: i686-unknown-linux-musl, repo_suffix: '', component: main }
279279
# Debian also calls this "armel" (conflict with arm-unknown-linux-musleabi)
280-
# - { target: armv5te-unknown-linux-musleabi, repo: tedge-main, component: main }
281-
- { target: riscv64gc-unknown-linux-gnu, repo: tedge-main, component: main }
282-
- { target: aarch64-apple-darwin, repo: tedge-main, component: main }
283-
- { target: x86_64-apple-darwin, repo: tedge-main, component: main }
280+
# - { target: armv5te-unknown-linux-musleabi, repo_suffix: '', component: main }
281+
- { target: riscv64gc-unknown-linux-gnu, repo_suffix: '', component: main }
282+
- { target: aarch64-apple-darwin, repo_suffix: '', component: main }
283+
- { target: x86_64-apple-darwin, repo_suffix: '', component: main }
284284

285285
steps:
286286
- name: Checkout
@@ -301,11 +301,12 @@ jobs:
301301
- uses: taiki-e/install-action@just
302302
- name: Publish packages
303303
env:
304+
PUBLISH_REPO: ${{ secrets.PUBLISH_REPO }}${{ matrix.job.repo_suffix }}
304305
PUBLISH_OWNER: ${{ secrets.PUBLISH_OWNER }}
305306
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
306307
run: |
307308
just publish-linux-target "${{ matrix.job.target }}" \
308-
--repo "${{ matrix.job.repo }}" \
309+
--repo "${PUBLISH_REPO}" \
309310
--component "${{ matrix.job.component }}"
310311
311312
# Wait until all other publishing jobs are finished
@@ -412,11 +413,12 @@ jobs:
412413
run: just release-linux-virtual
413414
- name: Publish packages
414415
env:
416+
PUBLISH_REPO: ${{ secrets.PUBLISH_REPO }}
415417
PUBLISH_OWNER: ${{ secrets.PUBLISH_OWNER }}
416418
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
417419
run: |
418-
just publish-linux-virtual --repo tedge-main
419-
just publish-linux-virtual --repo tedge-main-armv6
420+
just publish-linux-virtual --repo "${PUBLISH_REPO}"
421+
just publish-linux-virtual --repo "${PUBLISH_REPO}-armv6"
420422
421423
release:
422424
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)