Skip to content

Commit

Permalink
Update push action
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 11, 2024
1 parent 986c6d7 commit 4216a4d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/push-on-change.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- '*/*'
workflow_dispatch:

name: Push on change

jobs:
create_key:
runs-on: ubuntu-24.04

name: Push on change ${{ github.ref }}

steps:
- name: Install git-filter-repo
run: |
sudo apt-get update
sudo apt-get install -y git-filter-repo
- name: Check out our repository
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0

- name: Configure Git identity
run: |
git log -n 1 --pretty=format:"git config --global user.name '%an' && git config --global user.email '%ae'" | tee /dev/stderr | sh
- name: Get branch name
id: remote_repo
run: |
echo "slug=$(echo $GITHUB_REF | sed 's#refs/heads/##')" >> $GITHUB_OUTPUT
shell: bash

- name: Merge subtree
env:
TOKEN_KEYS: ${{ secrets.TOKEN_KEYS }}
GH_TOKEN: ${{ secrets.TOKEN_KEYS }}
run: |
./run.sh merge_into_remote ${{ steps.remote_repo.outputs.slug }}

0 comments on commit 4216a4d

Please sign in to comment.