Skip to content

Commit 9fdd20e

Browse files
ludamadclaude
andauthored
feat: private fork release pipeline (#20707)
Part of ability to have private repo forks Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8d63fa4 commit 9fdd20e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Accepts a release dispatch from a private fork.
2+
# Checks out the fork's code and runs the standard release pipeline
3+
# using this (public) repo's secrets and publishing identity.
4+
# The tag is pushed here with [skip ci] to avoid triggering the normal ci3.yml release.
5+
name: Release (Fork)
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Release tag (e.g. v5.0.0)"
11+
required: true
12+
commit:
13+
description: "Commit SHA from the source repo"
14+
required: true
15+
source_repo:
16+
description: "Source repository to clone"
17+
required: true
18+
19+
jobs:
20+
release:
21+
runs-on: ubuntu-latest
22+
environment: master
23+
steps:
24+
- name: Checkout source
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
26+
with:
27+
repository: ${{ inputs.source_repo }}
28+
ref: ${{ inputs.commit }}
29+
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
30+
fetch-depth: 1
31+
persist-credentials: false
32+
33+
- name: Push tag
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
36+
run: |
37+
git config user.name "AztecBot"
38+
git config user.email "tech@aztecprotocol.com"
39+
git remote add public "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
40+
git fetch public next --depth=1
41+
git tag -a "${{ inputs.tag }}" public/next -m "${{ inputs.tag }} [skip ci]"
42+
git push public "refs/tags/${{ inputs.tag }}" || echo "Tag already exists, continuing."
43+
44+
- name: Release
45+
env:
46+
CI: "1"
47+
RELEASE_ALL: "1"
48+
REF_NAME: ${{ inputs.tag }}
49+
RUN_ID: ${{ github.run_id }}
50+
SOURCE_REPOSITORY: ${{ inputs.source_repo }}
51+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
52+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
53+
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
54+
BUILD_INSTANCE_SSH_KEY: ${{ secrets.BUILD_INSTANCE_SSH_KEY }}
55+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
56+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
57+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
58+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
60+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
61+
run: ./.github/ci3.sh release

0 commit comments

Comments
 (0)