Skip to content

Commit

Permalink
Permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaro committed Aug 8, 2024
1 parent e747cfd commit 1375096
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
MY_NAME: "Nikolas Garofil (Using GitHub Actions)"
MY_EMAIL: "[email protected]"

permissions:
contents: write

jobs:
update-readme:
runs-on: ubuntu-latest
Expand All @@ -19,13 +22,14 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup git
run: |
git config --global user.email "$MY_EMAIL"
git config --global user.name "$MY_NAME"
-
name: Update README.md in all other branches
shell: bash
run: |
echo "Setting up git"
git config --global user.email "$MY_EMAIL"
git config --global user.name "$MY_NAME"
echo "Finding all branches"
BRANCHES=$(git branch --format='%(refname:short)' -r | grep -v 'origin/HEAD' | sed 's/origin\///' | xargs)
echo "Checking out the branch that triggered the workflow (${{ github.ref }}) so that we can find it's short name"
Expand Down

0 comments on commit 1375096

Please sign in to comment.