Skip to content

Commit 03a2789

Browse files
Update version docs when making a release
1 parent 48b9cec commit 03a2789

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,4 @@ jobs:
6565
--registry-path "$REGISTRY_BASE_PATH" \
6666
--stub-registry "$STUB_REGISTRY" \
6767
--stub-registry-path "$STUB_REGISTRY_BASE_PATH" \
68-
--secondary-registry-path "$SECONDARY_REGISTRY_BASE_PATH"
69-
70-
image-info:
71-
name: Trigger info extraction
72-
needs: [build-and-push]
73-
uses: devcontainers/images/.github/workflows/version-history.yml@main
74-
permissions:
75-
contents: write
76-
pull-requests: write
77-
with:
78-
release: "${{ github.ref }}"
79-
cg: "false"
80-
push: "true"
81-
overwrite: "false"
82-
secrets: inherit
68+
--secondary-registry-path "$SECONDARY_REGISTRY_BASE_PATH"

.github/workflows/release-pr.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ on:
1111
permissions:
1212
contents: write
1313

14+
env:
15+
target_branch: rel/${{github.event.inputs.version}}
16+
version: ${{github.event.inputs.version}}
1417

1518
jobs:
1619
update_manifest_files:
1720
runs-on: ubuntu-latest
18-
env:
19-
target_branch: rel/${{github.event.inputs.version}}
20-
version: ${{github.event.inputs.version}}
2121
steps:
2222
- uses: actions/checkout@v5
2323
- name: Set up Node.js
@@ -34,10 +34,10 @@ jobs:
3434
run: |
3535
git config --global user.email [email protected]
3636
git config --global user.name github-actions
37-
git checkout -b $target_branch
37+
git checkout -b ${{ env.target_branch }}
3838
git add -A
3939
git commit -m "Release manifest update"
40-
git push origin $target_branch
40+
git push origin ${{ env.target_branch }}
4141
- name: Create pull request
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.PAT }}
@@ -46,9 +46,22 @@ jobs:
4646
--method POST \
4747
-H "Accept: application/vnd.github+json" \
4848
/repos/${GITHUB_REPOSITORY}/pulls \
49-
-f title="[Monthly Release] $version" \
49+
-f title="[Monthly Release] ${{ env.version }}" \
5050
-f body="" \
51-
-f head="$target_branch" \
51+
-f head="${{ env.target_branch }}" \
5252
-f base='main'
53+
image-info:
54+
name: Trigger info extraction
55+
needs: [build-and-push]
56+
uses: devcontainers/images/.github/workflows/version-history.yml@main
57+
permissions:
58+
contents: write
59+
pull-requests: write
60+
with:
61+
release: "${{ github.ref }}"
62+
cg: "false"
63+
push: "true"
64+
overwrite: "false"
65+
target_branch: ${{ env.target_branch }}
66+
secrets: inherit
5367

54-

.github/workflows/version-history.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
required: true
2424
default: 'true'
2525
type: string
26+
target_branch:
27+
description: 'Branch to push changes to'
28+
required: false
29+
type: string
2630

2731
jobs:
2832
image_info:
@@ -98,7 +102,7 @@ jobs:
98102
git config --global user.name github-actions
99103
git config pull.rebase false
100104
101-
branch=automated-update-for-image-history-$GITHUB_RUN_ID
105+
branch="${{ inputs.target_branch || format('automated-update-for-image-history-{0}', github.run_id) }}"
102106
git checkout -b $branch
103107
message='Automated update for image history'
104108

0 commit comments

Comments
 (0)