ci: resolve changes workflow for pull requests #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: changes | |
"on": | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
id: source | |
if: github.event_name != 'pull_request' | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
- name: PR checkout | |
id: altsource | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v4 | |
- name: Setup golang | |
id: golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21.0 | |
- name: Run changelog | |
id: changelog | |
run: make changelog | |
- name: Commit changes | |
id: commit | |
if: github.event_name != 'pull_request' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: GitHub Actions | |
author_email: [email protected] | |
add: CHANGELOG.md | |
message: "docs: automated changelog update" | |
push: true | |
commit: --signoff | |
envvars: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
id: source | |
if: github.event_name != 'pull_request' | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
- name: PR checkout | |
id: altsource | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v4 | |
- name: Setup golang | |
id: golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21.0 | |
- name: Generate envvars | |
id: envvars | |
run: make envvars | |
- name: Commit changes | |
id: commit | |
if: github.event_name != 'pull_request' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: GitHub Actions | |
author_email: [email protected] | |
add: docs/partials/envvars.md | |
message: "docs: automated envvars update" | |
push: true | |
commit: --signoff | |
labels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
id: source | |
if: github.event_name != 'pull_request' | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
- name: PR checkout | |
id: altsource | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v4 | |
- name: Setup golang | |
id: golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.21.0 | |
- name: Generate labels | |
id: labels | |
run: make labels | |
- name: Commit changes | |
id: commit | |
if: github.event_name != 'pull_request' | |
uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: GitHub Actions | |
author_email: [email protected] | |
add: docs/partials/labels.md | |
message: "docs: automated labels update" | |
push: true | |
commit: --signoff | |
... |