Skip to content

chore(release): Test v7.12.0 #1

chore(release): Test v7.12.0

chore(release): Test v7.12.0 #1

name: Release to Production
on:
pull_request:
branches:
- production
types: [closed]
jobs:
release:
if: ${{ github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Push to Production Server
run: |
JOB_ID=$(echo ${{ github.event.pull_request.body}} | perl -ne 'print "$1\n" and exit if m/^Production Job Id:\s(\w+)/;')
echo "JOB_ID=${JOB_ID}" >> $GITHUB_ENV
curl "https://gitlab.com/api/v4/projects/${{ vars.GITLAB_PROJECT_ID }}/jobs/$JOB_ID/play" \
--request POST \
--header 'PRIVATE-TOKEN: ${{ secrets.GITLAB_API_TOKEN }}'
- name: Poll Production Release
uses: artiz/poll-endpoint@1.0.2
with:
url: https://gitlab.com/api/v4/projects/${{ vars.GITLAB_PROJECT_ID }}/jobs/${{ env.JOB_ID }}
method: GET
expect-status: 200
expect-response-regex: '"status":"success"'
timeout: 120000
interval: 3000