Repository navigation
Update argparse #515
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update argparse | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 7 * * *' | |
| jobs: | |
| update-yaml: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Fetch release version | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| OWNER: p-ranav | |
| REPO: argparse | |
| run: | | |
| VERSION=$(gh api "/repos/$OWNER/$REPO/releases/latest" --jq ".tag_name") | |
| echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - name: Modify file if new version | |
| run: | | |
| sed -i 's/\(set(ARGPARSE_GIT_TAG "\)[^"]*\(".*\)/\1${{ env.VERSION }}\2/' .github/workflows/deps/CMakeLists.txt | |
| - name: Create PR if new version | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| title: "chore(ci): update argparse to ${{ env.VERSION }}" | |
| branch: "argparse-${{ env.VERSION }}" | |
| commit-message: "chore(ci): update argparse to ${{ env.VERSION }}" | |
| body: | | |
| Update argparse to ${{ env.VERSION }}. | |
| This PR has been created automatically. | |
| committer: github-actions[bot] <noreply@github.com> | |
| author: github-actions[bot] <noreply@github.com> | |
| assignees: "EmixamPP" | |
| labels: dependencies | |
| delete-branch: true |