Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflows with app-generated access token #113

Merged
merged 4 commits into from
Jan 5, 2025
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
21 changes: 14 additions & 7 deletions .github/workflows/respec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ jobs:
respec:
if: github.repository == 'OAI/Overlay-Specification'

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
owner: OAI
repositories: OpenAPI-Specification

- uses: actions/checkout@v4 # checkout main branch
with:
fetch-depth: 0
Expand All @@ -35,7 +44,7 @@ jobs:

- uses: actions/checkout@v4 # checkout gh-pages branch
with:
token: ${{ secrets.OAS_REPO_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
repository: OAI/OpenAPI-Specification # TODO: change to OAI/...
ref: gh-pages
path: deploy
Expand All @@ -46,16 +55,14 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
# A personal access token is required to push changes to the repository.
# This token needs to be refreshed regularly and stored in the repository secrets.
token: ${{ secrets.OAS_REPO_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
branch: update-overlay-respec-version
base: gh-pages
delete-branch: true
path: deploy
labels: Housekeeping
team-reviewers: OAI/tsc
title: Update ReSpec-rendered specification versions for Overlay
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl
title: Overlay - Update ReSpec-rendered specification versions
commit-message: Update ReSpec-rendered specification versions
signoff: true
body: |
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/schema-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Generate access token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.OAI_SPEC_PUBLISHER_APPID }}
private-key: ${{ secrets.OAI_SPEC_PUBLISHER_PRIVATE_KEY }}
owner: OAI
repositories: OpenAPI-Specification

- uses: actions/checkout@v4 # checkout main branch
with:
fetch-depth: 0
Expand All @@ -31,7 +40,7 @@ jobs:

- uses: actions/checkout@v4 # checkout gh-pages branch
with:
token: ${{ secrets.OAS_REPO_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
repository: OAI/OpenAPI-Specification
ref: gh-pages
path: deploy
Expand All @@ -42,16 +51,14 @@ jobs:
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
# A personal access token is required to push changes to the repository.
# This token needs to be refreshed regularly and stored in the repository secrets.
token: ${{ secrets.OAS_REPO_TOKEN }}
token: ${{ steps.generate-token.outputs.token }}
branch: publish-overlay-schema-iteration
base: gh-pages
delete-branch: true
path: deploy
labels: Housekeeping,Schema
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews
title: Publish Overlay Schema Iterations
reviewers: darrelmiller,webron,earth2marsh,lornajane,mikekistler,miqui,handrews,ralfhandl
title: Overlay - Publish Schema Iterations
commit-message: New Overlay schema iterations
signoff: true
body: |
Expand Down
Loading