Skip to content

Commit

Permalink
Merge pull request #1436 from alphagov/create-pr-on-tags
Browse files Browse the repository at this point in the history
Create PRs on tag creation for Staging and Prod
  • Loading branch information
kentsanggds committed Aug 4, 2023
2 parents 0ca6c6f + a3eeb22 commit 429c347
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/create-pr-on-tags.yaml
Original file line number Diff line number Diff line change
@@ -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-latest
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" )
3 changes: 2 additions & 1 deletion .github/workflows/create-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
create_pr:
name: Create charts PR
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout ckanext-datagovuk repository
uses: actions/checkout@v3
Expand All @@ -23,3 +23,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }}
GH_REF: ${{ github.ref_name }}
ENVS: "integration"
2 changes: 1 addition & 1 deletion docker/create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 429c347

Please sign in to comment.