36 lines
949 B
YAML
36 lines
949 B
YAML
name: Sync Fork with Upstream
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * 1' # Runs at midnight UTC every Monday
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
fetch-depth: 0
|
|
|
|
- name: Fetch Upstream Remote
|
|
run: |
|
|
git remote add upstream https://github.com/advanced-security/maven-dependency-submission-action.git
|
|
git fetch upstream
|
|
|
|
- name: Set Git Config
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Merge Upstream `main`
|
|
run: |
|
|
git merge upstream/main --no-commit
|
|
git reset -- ./.github
|
|
git commit -m "Merge upstream:main"
|
|
git push
|