Fix checkout
This commit is contained in:
parent
99429c8489
commit
b8f256e3ef
15
.github/workflows/fork-sync.yml
vendored
15
.github/workflows/fork-sync.yml
vendored
@ -14,7 +14,11 @@ jobs:
|
|||||||
synchronize-upstream:
|
synchronize-upstream:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: gh repo clone discretizer/homepage
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: upstream
|
||||||
|
fetch-depth: 0
|
||||||
|
- run: git remote add upstream https://github.com/gethomepage/homepage.git
|
||||||
- name: Fetch Upstream Tags
|
- name: Fetch Upstream Tags
|
||||||
id: fetch-upstream-tags
|
id: fetch-upstream-tags
|
||||||
if: ${{ !inputs.tags }}
|
if: ${{ !inputs.tags }}
|
||||||
@ -27,17 +31,10 @@ jobs:
|
|||||||
echo 'NEW_TAGS<<EOF' >> $GITHUB_OUTPUT
|
echo 'NEW_TAGS<<EOF' >> $GITHUB_OUTPUT
|
||||||
$(eval `git for-each-ref --format=$fmt --no-merge upstream refs/tags`) >> $GITHUB_OUTPUT
|
$(eval `git for-each-ref --format=$fmt --no-merge upstream refs/tags`) >> $GITHUB_OUTPUT
|
||||||
echo 'EOF' >> $GITHUB_OUTPUT
|
echo 'EOF' >> $GITHUB_OUTPUT
|
||||||
working-directory: homepage
|
|
||||||
- name: Set Identity
|
|
||||||
run: |
|
|
||||||
git config user.name "Github Action"
|
|
||||||
git config user.email "bot@github-actions"
|
|
||||||
working-directory: homepage
|
|
||||||
- name: Bump Current
|
- name: Bump Current
|
||||||
run: |
|
run: |
|
||||||
git checkout upstream
|
git checkout upstream
|
||||||
git merge upstream/main upstream
|
git merge upstream/main upstream
|
||||||
working-directory: homepage
|
|
||||||
- name: Create Tags
|
- name: Create Tags
|
||||||
if: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
|
if: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
|
||||||
run: |
|
run: |
|
||||||
@ -49,11 +46,9 @@ jobs:
|
|||||||
git tag ${TAG} release/${TAG}
|
git tag ${TAG} release/${TAG}
|
||||||
done
|
done
|
||||||
for TAG in ${NEW_TAGS}; do git push -u origin release/${TAG} ${TAG}; done
|
for TAG in ${NEW_TAGS}; do git push -u origin release/${TAG} ${TAG}; done
|
||||||
working-directory: homepage
|
|
||||||
env:
|
env:
|
||||||
NEW_TAGS: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
|
NEW_TAGS: ${{inputs.tags || steps.fetch-upstream-tags.outputs.NEW_TAGS}}
|
||||||
- name: Push Current
|
- name: Push Current
|
||||||
working-directory: homepage
|
|
||||||
run: |
|
run: |
|
||||||
git checkout -b current upstream
|
git checkout -b current upstream
|
||||||
git rev-list --no-merges --reverse origin/feature/add_auth ^upstream | git cherry-pick --stdin
|
git rev-list --no-merges --reverse origin/feature/add_auth ^upstream | git cherry-pick --stdin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user