Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update release workflows to use GitHub App instead of PATs#432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall 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
18 changes: 15 additions & 3 deletions.github/workflows/update-release-status.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -134,11 +134,23 @@ jobs:

echo "check-run-head-sha=$CHECK_RUN_HEAD_SHA" >> "$GITHUB_OUTPUT"

generate-token:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.generate-token.outputs.token }}
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@eaddb9eb7e4226c68cf4b39f167c83e5bd132b3e
with:
app_id: ${{ vars.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}

update-release:
needs: validate-check-runs
needs:[validate-check-runs, generate-token]
if: needs.validate-check-runs.outputs.status == 'completed'
uses: ./.github/workflows/update-release.yml
with:
head-sha: ${{ needs.validate-check-runs.outputs.check-run-head-sha }}
head-sha: ${{ needs.validate-check-runs.outputs.check-run-head-sha }}
secrets:
RELEASE_ENGINEERING_TOKEN: ${{secrets.RELEASE_ENGINEERING_TOKEN }}
RELEASE_ENGINEERING_TOKEN: ${{generate-token.outputs.token }}
15 changes: 14 additions & 1 deletion.github/workflows/update-release.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,8 +23,21 @@ env:
HEAD_SHA: ${{ inputs.head-sha }}

jobs:
generate-token:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.generate-token.outputs.token }}
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@eaddb9eb7e4226c68cf4b39f167c83e5bd132b3e
with:
app_id: ${{ vars.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}

update-release:
name: "Update release"
needs: generate-token
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand All@@ -43,7 +56,7 @@ jobs:
- name: Update release assets
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_ENGINEERING_TOKEN: ${{secrets.RELEASE_ENGINEERING_TOKEN }}
RELEASE_ENGINEERING_TOKEN: ${{generate-token.outputs.token }}
run: |
python scripts/release/update-release-assets.py \
--head-sha $HEAD_SHA \
Expand Down
30 changes: 21 additions & 9 deletions.github/workflows/validate-release.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,17 @@ env:
HEAD_SHA: ${{ github.event.pull_request.head.sha }}

jobs:
generate-token:
runs-on: ubuntu-latest
outputs:
token: ${{ steps.generate-token.outputs.token }}
steps:
- name: Generate token
id: generate-token
uses: actions/create-github-app-token@eaddb9eb7e4226c68cf4b39f167c83e5bd132b3e
with:
app_id: ${{ vars.AUTOMATION_APP_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}

pre-validate-performance:
outputs:
Expand All@@ -36,13 +47,13 @@ jobs:
echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"

validate-performance:
needs: pre-validate-performance
needs:[pre-validate-performance, generate-token]
runs-on: ubuntu-22.04
steps:
- name: Invoke performance test
env:
CHECK_RUN_ID: ${{ needs.pre-validate-performance.outputs.check-run-id }}
GH_TOKEN: ${{secrets.RELEASE_ENGINEERING_TOKEN }}
GH_TOKEN: ${{generate-token.outputs.token }}
run: |
jq -n \
--arg ref "$HEAD_SHA" \
Expand All@@ -61,8 +72,8 @@ jobs:
steps:
- name: Fail check run status
env:
CHECK_RUN_ID: ${{ needs.pre-validate-performance.outputs.check-run-id }}
GITHUB_TOKEN: ${{ github.token }}
CHECK_RUN_ID: ${{ needs.pre-validate-performance.outputs.check-run-id }}
GITHUB_TOKEN: ${{ github.token }}
run: |
jq -n \
--arg status "completed" \
Expand DownExpand Up@@ -97,13 +108,13 @@ jobs:
echo "check-run-id=$check_run_id" >> "$GITHUB_OUTPUT"

validate-compiler-compatibility:
needs: pre-validate-compiler-compatibility
needs:[pre-validate-compiler-compatibility, generate-token]
runs-on: ubuntu-22.04
steps:
- name: Invoke compiler compatibility test
env:
CHECK_RUN_ID: ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
GITHUB_TOKEN: ${{secrets.RELEASE_ENGINEERING_TOKEN }}
GITHUB_TOKEN: ${{generate-token.outputs.token }}
run: |
jq -n \
--arg ref "$HEAD_SHA" \
Expand All@@ -116,14 +127,15 @@ jobs:
--ref rvermeulen/release-process

on-failure-validate-compiler-compatibility-dispatch:
needs: [pre-validate-compiler-compatibility, validate-compiler-compatibility]
needs:
[pre-validate-compiler-compatibility, validate-compiler-compatibility]
if: failure()
runs-on: ubuntu-22.04
steps:
- name: Fail check run status
env:
CHECK_RUN_ID: ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
GITHUB_TOKEN: ${{ github.token }}
CHECK_RUN_ID: ${{ needs.pre-validate-compiler-compatibility.outputs.check-run-id }}
GITHUB_TOKEN: ${{ github.token }}
run: |
jq -n \
--arg status "completed" \
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp