diff --git a/.github/workflows/create-pr-on-tags.yaml b/.github/workflows/create-pr-on-tags.yaml new file mode 100644 index 000000000..9670a2ddd --- /dev/null +++ b/.github/workflows/create-pr-on-tags.yaml @@ -0,0 +1,22 @@ +name: Create charts PR on tags creation + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + create_pr: + name: Create charts PR + runs-on: ubuntu-22.04 + steps: + - name: Checkout ckanext-datagovuk repository + uses: actions/checkout@v3 + with: + repository: alphagov/ckanext-datagovuk + path: ckanext + - run: bash ./ckanext/docker/create-pr.sh + env: + GH_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }} + GH_REF: ${{ github.ref_name }} + ENVS: ( "staging" "production" ) diff --git a/.github/workflows/create-pr.yaml b/.github/workflows/create-pr.yaml index 364d691ec..d0a26e81a 100644 --- a/.github/workflows/create-pr.yaml +++ b/.github/workflows/create-pr.yaml @@ -23,3 +23,4 @@ jobs: env: GH_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }} GH_REF: ${{ github.ref_name }} + ENVS: "integration" diff --git a/docker/create-pr.sh b/docker/create-pr.sh index ed3f1bea9..6993be91e 100644 --- a/docker/create-pr.sh +++ b/docker/create-pr.sh @@ -14,7 +14,7 @@ git clone https://${GH_TOKEN}@github.com/alphagov/govuk-ckan-charts.git charts cd charts/charts/ckan/images git checkout -b ${BRANCH} -for ENV in integration; do +for ENV in ${ENVS}; do ( cd "${ENV}" for APP in ckan pycsw solr; do