Skip to content

Commit

Permalink
Update repository URLs before recommiting symc template PR
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Mar 1, 2024
1 parent 0d23e17 commit 11898af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,31 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.1
- uses: AndreasAugustin/actions-template-sync@v1.6.2
- name: Sync from template repo
id: template_sync
uses: AndreasAugustin/actions-template-sync@v1.8.0
with:
# We need custom PAT with workflows permissions so we can update all the boilerplate .github files from
# awesome-template.
github_token: ${{ secrets.WORKFLOW_UPDATE_GITHUB_PAT || secrets.GITHUB_TOKEN }}
source_repo_path: kdeldycke/awesome-template
pr_title: "[sync] Template"
pr_commit_msg: "[sync] Template"
pr_labels: "📚 documentation"
pr_title: "[sync] Update from `awesome-template` repository"
pr_commit_msg: "[sync] Update from `awesome-template` repository"
pr_labels: "📚 documentation"
# XXX Stuff below are being discussed as a feature request at:
# https://github.com/AndreasAugustin/actions-template-sync/issues/467
- name: Checkout template sync PR
uses: actions/checkout@v4.1.1
with:
ref: ${{ steps.template_sync.outputs.pr_branch }}
- name: Update repo URLs
# Replace "/kdeldycke/awesome-template/" in URLs by "/kdeldycke/awesome-<repo_id>/".
run: >

Check failure on line 400 in .github/workflows/docs.yaml

View workflow job for this annotation

GitHub Actions / lint-github-action

shellcheck reported issue in this script: SC2146:warning:1:51: This action ignores everything before the -o. Use \( \) to group
find ./.github/ -iname "*.md" -or -iname "*.yaml" -exec
sed -i "s/\/kdeldycke\/awesome-template\//\/kdeldycke\/${{ github.event.repository.name }}\//g" "{}" \;
- name: Push to PR
uses: peter-evans/create-pull-request@v6.0.0
with:
assignees: ${{ github.actor }}
commit-message: "[sync] Update template URLs"
branch: ${{ steps.template_sync.outputs.pr_branch }}
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
This version is not released yet and is under active development.
```

- Update repository URLs in `awesome-template-sync` job before re committing the PR.

## [3.3.0 (2024-02-26)](https://github.com/kdeldycke/workflows/compare/v3.2.4...v3.3.0)

- Start collecting `bump-my-version` rules from different projects.
Expand Down

0 comments on commit 11898af

Please sign in to comment.