Skip to content

Commit

Permalink
Push commit histories to another branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed Jan 25, 2024
1 parent 19c858a commit d003acc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 101 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/setup_repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: setup repo

on:
create:

jobs:
setup-repo:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@master

- run: sed -i 's|{-ActivityLocation-}|https://raw.githubusercontent.com/${{ github.repository }}/activity-resources/image.svg|g' README.md

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update generated README
branch: main
push_options: '--force'
commit_user_name: activity-action 🤖
commit_user_email: [email protected]
commit_author: activity-action 🤖 <[email protected]>
file_pattern: 'README.md'
- uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'activity-resources'
9 changes: 4 additions & 5 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,19 @@ jobs:

steps:
- uses: actions/checkout@master
with:
ref: activity-resources

- uses: aoli-al/activity-action@main
env:
GITHUB_TOKEN: ${{ secrets.ACTIVITY_ACTION_S24_TOKEN }}
with:
template: "README.md.tpl"
output: "README.md"

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update generated README
branch: main
branch: activity-resources
push_options: '--force'
commit_user_name: activity-action 🤖
commit_user_email: [email protected]
commit_author: activity-action 🤖 <[email protected]>
file_pattern: 'README.md'
file_pattern: 'Contributors.md image.svg'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributors


![]({-ActivityLocation-})


# ![NodeBB](public/images/sm-card.png)
Expand Down
95 changes: 0 additions & 95 deletions README.md.tpl

This file was deleted.

0 comments on commit d003acc

Please sign in to comment.