Skip to content

Commit 71a0189

Browse files
authored
ci: align with kubernetes-etcd-backup (#101)
* chore: add YAML separator * ci: use GITHUB_TOKEN for semantic release * ci: add package write permissions to release-container-image
1 parent 591d2a2 commit 71a0189

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/release-container-image.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Release Container Image
23

34
on:
@@ -11,6 +12,8 @@ on:
1112

1213
jobs:
1314
container:
15+
permissions:
16+
packages: write
1417
runs-on: ubuntu-latest
1518
steps:
1619
- name: Checkout
@@ -42,7 +45,7 @@ jobs:
4245
uses: docker/login-action@v3
4346
with:
4447
registry: ghcr.io
45-
username: ${{ github.repository_owner }}
48+
username: ${{ github.actor }}
4649
password: ${{ secrets.GITHUB_TOKEN }}
4750
if: ${{ github.event_name != 'pull_request' }}
4851

@@ -62,7 +65,6 @@ jobs:
6265
if: ${{ github.event_name != 'pull_request' }}
6366

6467
- name: Build and push
65-
id: docker_build_ghcr
6668
uses: docker/build-push-action@v6
6769
with:
6870
context: .

.github/workflows/semantic-release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# runs on each push to main and is responsible for creating new tags/releases
23
name: Create Semantic Release
34

@@ -9,6 +10,8 @@ on:
910
jobs:
1011
semantic-release:
1112
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
1215
steps:
1316
- name: Checkout
1417
uses: actions/checkout@v4
@@ -18,5 +21,5 @@ jobs:
1821
id: semrel
1922
uses: go-semantic-release/action@v1.24
2023
with:
21-
github-token: ${{ secrets.PAT }}
24+
github-token: ${{ secrets.GITHUB_TOKEN }}
2225
allow-initial-development-versions: true

.github/workflows/shellcheck.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Shellcheck
23
on: pull_request
34
jobs:

0 commit comments

Comments
 (0)