Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/main-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,30 @@ jobs:
labels: newLabels,
assignees: ['matttrach']
});
if (versionLabel) {
// if version label detected, then add appropriate sub-issues
const parentIssue = newIssue.data;
const parentIssueTitle = parentIssue.title;
const parentIssueNumber = parentIssue.number;
// Note: can't get terraform-maintainers team, the default token can't access org level objects
// Create the sub-issue
const newSubIssue = await github.rest.issues.create({
owner: owner,
repo: repo,
title: "Backport #" + parentIssueNumber + " to release/v0",
body: "Backport #" + parentIssueNumber + " to release/v0",
labels: ['release/v0'],
assignees: ['matttrach']
});
const subIssueId = newSubIssue.data.id;
// Attach the sub-issue to the parent using API request
await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues', {
owner: owner,
repo: repo,
issue_number: parentIssueNumber,
sub_issue_id: subIssueId,
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
});
}
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ on:
- release/v0
- release/v1

permissions: write-all
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
actions: read

jobs:
release:
Expand Down Expand Up @@ -81,7 +86,7 @@ jobs:
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/rancher/${{ github.repository }}/signing/gpg passphrase | GPG_PASSPHRASE ;
secret/data/github/repo/rancher/${{ github.repository }}/signing/gpg passphrase | GPG_PASSPHRASE;
secret/data/github/repo/rancher/${{ github.repository }}/signing/gpg privateKeyId | GPG_KEY_ID;
secret/data/github/repo/rancher/${{ github.repository }}/signing/gpg privateKey | GPG_KEY;
- name: import_gpg_key
Expand Down Expand Up @@ -114,7 +119,6 @@ jobs:
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}
GPG_PASSPHRASE: ${{ env.GPG_PASSPHRASE }}


# These run after release-please generates a release, so when the release PR is merged
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
if: steps.release-please.outputs.version
Expand Down
Loading