Skip to content

Commit 83f9239

Browse files
Update GitHub Actions workflow to include permissions for version bumping and Docker image pushing; configure Git for automated commits
1 parent d5ae84a commit 83f9239

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/docker-ghcr.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
jobs:
99
bump-version:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # Required to push changes and tags
13+
packages: write # Required to push Docker images
1114
outputs:
1215
new_version: ${{ steps.bump_version.outputs.new_version }}
1316

@@ -35,6 +38,12 @@ jobs:
3538
echo "new_version=$new_version" >> $GITHUB_ENV
3639
echo "::set-output name=new_version::$new_version"
3740
41+
- name: Setup Git for pushing
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
git remote set-url origin https://x-access-token:${{ secrets.GHCR }}@github.com/giuseppe99barchetta/MediaFlowrr.git
46+
3847
- name: Commit and push new version
3948
run: |
4049
git config --global user.name "github-actions[bot]"
@@ -66,7 +75,7 @@ jobs:
6675
with:
6776
registry: ghcr.io
6877
username: giuseppe99barchetta
69-
password: ${{ secrets.GITHUB_TOKEN }}
78+
password: ${{ secrets.GHCR }}
7079

7180
- name: Build & Push
7281
id: build-and-push

0 commit comments

Comments
 (0)