Skip to content

Commit

Permalink
Update mirror action (allow force push)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Oct 1, 2024
1 parent 1abcad5 commit fac0b1a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Push mirror to git.mysociety.org
on:
push:
workflow_dispatch:
inputs:
force_push:
description: 'Force push branch'
type: boolean
required: false

jobs:
sync:
Expand All @@ -11,15 +16,28 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Push branch to git.mysociety.org
id: push_to_mirror
uses: mysociety/[email protected]
if: ${{ github.event.inputs.force_push == 'false' || !github.event.inputs.force_push }}
uses: mysociety/[email protected]
with:
git_ssh_key: ${{ secrets.PUBLICCVS_GIT_KEY }}
ssh_known_hosts: ${{ secrets.GIT_KNOWN_HOSTS }}
tag: ${{ github.ref_name }}
remote: 'ssh://[email protected]/data/git/public/parlparse.git'
remote: 'ssh://[email protected]/data/git/public/parlparse.git'


- name: Push branch to git.mysociety.org (force)
id: push_to_mirror_force
if: ${{ github.event.inputs.force_push == 'true' }}
uses: mysociety/[email protected]
with:
git_ssh_key: ${{ secrets.PUBLICCVS_GIT_KEY }}
ssh_known_hosts: ${{ secrets.GIT_KNOWN_HOSTS }}
tag: ${{ github.ref_name }}
remote: 'ssh://[email protected]/data/git/public/parlparse.git'
extra_git_config: --force

0 comments on commit fac0b1a

Please sign in to comment.