Skip to content

Commit

Permalink
Merge pull request #154 from datamweb/datamweb-patch-1
Browse files Browse the repository at this point in the history
Update auto-update-copyright.yml
  • Loading branch information
datamweb authored Aug 2, 2024
2 parents 8a7524a + 0ac862a commit 8cfc114
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/auto-update-copyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
jobs:
update-copyright-year:
permissions:
contents: write
pull-requests: write
contents: write-all
pull-requests: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -36,21 +36,21 @@ jobs:
git config --local user.name "GitHub Action"
# Create a new branch for the changes
BRANCH_NAME="update-copyright-${{ env.CURRENT_YEAR }}-${{ github.run_id }}"
BRANCH_NAME="update_copyright_${{ env.CURRENT_YEAR }}"
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
git switch -c $BRANCH_NAME develop
python .github/workflows/update_copyright.py # Run the Python script
git add -A # Ensure all changes are added
git add . # Ensure all changes are added
git commit -m "docs: update copyright year to ${{ env.CURRENT_YEAR }}"
git diff
git push origin $BRANCH_NAME
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
base: develop
title: "docs: update copyright year to ${{ env.CURRENT_YEAR }}."
body: "This pull request updates the copyright year to ${{ env.CURRENT_YEAR }}."
labels: "automation,copyright,documentation"
Expand Down

0 comments on commit 8cfc114

Please sign in to comment.