Skip to content

Commit

Permalink
Use github actions GITHUB_REF for latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kentsanggds committed Oct 9, 2023
1 parent 74e03c3 commit 4ac2bef
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/create-pr-on-tags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@ on:
workflows: [ "Build and push images on tags" ]
types:
- completed
branches:
- main

jobs:
create_pr:
name: Create charts PR
name: Create charts PR on tags creation
runs-on: ubuntu-latest
steps:
- name: Checkout ckanext-datagovuk repository
uses: actions/checkout@v3
with:
repository: alphagov/ckanext-datagovuk
path: ckanext
- name: Set latest tag
id: vars
run: echo "tag=$(git tag | sort --version-sort | tail -n1)" >> $GITHUB_OUTPUT
- run: bash ./ckanext/docker/create-pr.sh
- uses: actions/checkout@v3
- name: Set GH_REF
run: echo "GH_REF=`echo $(git fetch -t -q && git tag | sort --version-sort | tail -n1)`" >> $GITHUB_ENV
- run: bash ./docker/create-pr.sh
env:
GH_TOKEN: ${{ secrets.PR_GITHUB_TOKEN }}
GH_REF: ${{ steps.vars.output.tag }}
IS_TAG: "true"
ENVS: "staging,production"

0 comments on commit 4ac2bef

Please sign in to comment.