mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
CI: Fix missing permissions in workflow
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
2c9d8ef33c
commit
97dbc74ebc
4 changed files with 12 additions and 6 deletions
8
.github/workflows/generated_workflow.yml
vendored
8
.github/workflows/generated_workflow.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: CI Workflow
|
name: CI Workflow
|
||||||
on: push
|
on: push
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
contents: read
|
||||||
jobs:
|
jobs:
|
||||||
doc-generator:
|
doc-generator:
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
@ -43,6 +43,8 @@ jobs:
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -221,6 +223,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
GOPATH: /go
|
GOPATH: /go
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -234,13 +238,11 @@ jobs:
|
||||||
- name: Extract changelog
|
- name: Extract changelog
|
||||||
run: awk "/^#/ && ++c==2{exit}; /^#/f" "History.md" | tail -n +2 >release_changelog.md
|
run: awk "/^#/ && ++c==2{exit}; /^#/f" "History.md" | tail -n +2 >release_changelog.md
|
||||||
- name: Update stable branch
|
- name: Update stable branch
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
run: |
|
run: |
|
||||||
git branch -f stable ${GITHUB_SHA}
|
git branch -f stable ${GITHUB_SHA}
|
||||||
git push -f origin stable
|
git push -f origin stable
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
with:
|
||||||
artifacts: .build/*
|
artifacts: .build/*
|
||||||
bodyFile: release_changelog.md
|
bodyFile: release_changelog.md
|
||||||
|
|
|
@ -2,6 +2,6 @@ name: CI Workflow
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
contents: read
|
||||||
|
|
||||||
jobs: {}
|
jobs: {}
|
||||||
|
|
|
@ -7,6 +7,9 @@ defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -13,6 +13,9 @@ container:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
GOPATH: /go
|
GOPATH: /go
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -31,14 +34,12 @@ steps:
|
||||||
run: 'awk "/^#/ && ++c==2{exit}; /^#/f" "History.md" | tail -n +2 >release_changelog.md'
|
run: 'awk "/^#/ && ++c==2{exit}; /^#/f" "History.md" | tail -n +2 >release_changelog.md'
|
||||||
|
|
||||||
- name: Update stable branch
|
- name: Update stable branch
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
run: |
|
run: |
|
||||||
git branch -f stable ${GITHUB_SHA}
|
git branch -f stable ${GITHUB_SHA}
|
||||||
git push -f origin stable
|
git push -f origin stable
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
with:
|
||||||
artifacts: '.build/*'
|
artifacts: '.build/*'
|
||||||
bodyFile: release_changelog.md
|
bodyFile: release_changelog.md
|
||||||
|
|
Loading…
Reference in a new issue