From f192446a749f53baaff98859d6d94827d449a283 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Wed, 5 Jul 2023 07:20:25 +0100 Subject: [PATCH 1/5] Add mirror GitHub workflow Sync changes made on GitHub back to the mySociety git repo. --- .github/workflows/mirror.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 00000000..cdf32758 --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,35 @@ +# If linting checks pass ok, push to the git.mysociety.org mirror +# Note: the git.mysociety.org repo pushes to this repo, and has priority. +# Force pushes will need to be made through other means. + +name: Mirror to git.mysociety.org + +on: + push: + +jobs: + + ci: + uses: ./.github/workflows/ci.yml + + rubocop: + uses: ./.github/workflows/rubocop.yml + + mirror: + needs: [ci, rubocop] + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - name: Push branch to git.mysociety.org + id: push_to_mirror + uses: mysociety/action-git-pusher@v1.1.1 + with: + git_ssh_key: ${{ secrets.PUBLICCVS_GIT_KEY }} + ssh_known_hosts: ${{ secrets.GIT_KNOWN_HOSTS }} + tag: ${{ github.ref_name }} + remote: 'ssh://gh-public@git.mysociety.org/data/git/public/whatdotheyknow-theme.git' From d7e97a477c63145410954ddbe196b945993e8f73 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Wed, 5 Jul 2023 09:08:40 +0100 Subject: [PATCH 2/5] Update README.md Testing the GH workflow --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index df50ff61..b7f005c3 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,5 @@ To run tests, in the Alaveteli Rails.root (with this theme installed): bundle exec rspec lib/themes/whatdotheyknow-theme/spec Copyright (c) 2013 mySociety, released under the MIT license + +Test edit From 972f72c7481e9c616ebbf89056bedf0d6ad0109c Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Wed, 5 Jul 2023 09:21:20 +0100 Subject: [PATCH 3/5] Update rubocop.yml --- .github/workflows/rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 76d393bb..6c1ca8ce 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -1,6 +1,6 @@ name: RuboCop -on: [pull_request] +on: [pull_request, workflow_call] permissions: contents: read From 5d1f4f1c6ec5506ed745ab0261f6a32619ba1451 Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Wed, 5 Jul 2023 09:21:37 +0100 Subject: [PATCH 4/5] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a203bee9..e8a2d99d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: [master, develop] pull_request: + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From 845e6442d44cea0fb855d6555a153828a0328c8b Mon Sep 17 00:00:00 2001 From: Graeme Porteous Date: Wed, 5 Jul 2023 09:30:49 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b7f005c3..df50ff61 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,3 @@ To run tests, in the Alaveteli Rails.root (with this theme installed): bundle exec rspec lib/themes/whatdotheyknow-theme/spec Copyright (c) 2013 mySociety, released under the MIT license - -Test edit