Skip to content

Commit

Permalink
workflows/git-try-push: use local directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed May 22, 2024
1 parent 677db44 commit 5996dea
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/git-try-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ on:
- 'node_modules/**'

permissions:
contents: write

concurrency: git-try-push
contents: read

jobs:
try-push:
Expand All @@ -20,20 +18,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
fetch-depth: 0

- name: Prepare remote
run: |
git init --bare "${RUNNER_TEMP}/remote-repo"
git remote add local-remote "file://${RUNNER_TEMP}/remote-repo"
- name: Prepare
run: |
git checkout -b test-try-push
git push origin test-try-push
git push local-remote test-try-push
git reset --hard HEAD~1
git checkout -
- name: Push
uses: ./git-try-push/
with:
remote: local-remote
branch: test-try-push

- name: Clean
if: always()
run: git push --delete origin test-try-push

0 comments on commit 5996dea

Please sign in to comment.