Skip to content

Commit

Permalink
chore: integrate review
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Chataigner <[email protected]>
  • Loading branch information
tchataigner committed Jun 20, 2024
1 parent 7cb6f15 commit b902222
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/switch-license.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: License Switch April 23rd, 2025
on:
schedule:
- cron: '0 0 23 4 *'
- cron: '0 0 23 4 2025'

jobs:
release:
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Replace LICENSE.md
run: |
cp .github/workflows/assets/APACHE.md aptos/LICENSE.md
Expand All @@ -31,24 +31,21 @@ jobs:
rm .github/workflows/switch-license.yml
rm .github/workflows/assets/APACHE.md
- name: Commit changes
run: |
git add .
git commit -m "${{ env.PR_DESCRIPTION }}"
git push origin ${{ env.PR_BRANCH }}
# Note: Can't use `peter-evans/create-pull-request` because for hotfixes we need to make the PR with an existing branch
# The former always creates a new one for single-commit PRs, thus overwriting the actual hotfix
- name: Create PR
- name: PR Body
id: pr-body
run: |
cat << 'EOF' > body.md
This is an automated release PR for version `${ env.VERSION }}`.
On merge, this will trigger the [release publish workflow](${{ github.server_url }}/${{ github.repository }}/actions/workflows/tag-release.yml), which will upload a new GitHub release with tag `${{ env.VERSION }}`.
{
echo 'PR_BODY<<EOF'
This is an automated PR to update our licenses to Apache2.0.
[Workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
EOF
} >> "$GITHUB_ENV"
[Workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
EOF
gh pr create --title "${{ env.PR_DESCRIPTION }}" --body-file ./body.md --head ${{ env.PR_BRANCH }} --base ${{ env.BASE_BRANCH }}
env:
GH_TOKEN: ${{ github.token }}
- name: Create PR
uses: peter-evans/create-pull-request@v6
with:
body: ${{ env.PR_BODY }}
branch: "feature/license-switch"
title: "Switch to Apache2.0 License"

0 comments on commit b902222

Please sign in to comment.