Skip to content
name: "Push Release to Public RAP CoP Repo"
on:
release:
types: [published]
workflow_dispatch:
jobs:
push-release:
runs-on: "ubuntu-latest"
# Stop job from running
# if: github.repository == 'NHSDigital/RAP_CoP_dev'
if: ${{ false }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.EXTERNAL_REPO_TOKEN }}
fetch-depth: 0
- name: Add the public repository as a remote
run: |
git remote add public https://github.com/NHSDigital/rap-community-of-practice.git
git remote -v
- name: Read the release name and create a branch. Push branch to private and public.
run: |
RELEASE_NAME=$(gh release view --json name | jq -r '.name')
RELEASE_BRANCH=release/$RELEASE_NAME
git branch $RELEASE_BRANCH
git push -u origin $RELEASE_BRANCH
git push -u public $RELEASE_BRANCH
env:
GITHUB_TOKEN: ${{ secrets.EXTERNAL_REPO_TOKEN }}