Skip to content

Merge pull request #194 from NHSDigital/release/2024-05-15 #67

Merge pull request #194 from NHSDigital/release/2024-05-15

Merge pull request #194 from NHSDigital/release/2024-05-15 #67

Workflow file for this run

name: "Workflow: Merge to Main"
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
actions: write
jobs:
make-tag:
runs-on: [self-hosted, ci]
permissions: write-all
name: Create a tag from main
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Create 'env.tag' from the latest release
run: |
TAG=$(make changelog--get-latest-release)
echo "tag=${TAG}" >> $GITHUB_ENV
- name: Create tag named from 'env.tag'
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ env.tag }}',
sha: context.sha
})
outputs:
tag: ${{ env.tag }}
message-slack:
name: Notify slack of merge to main
needs: [make-tag]
runs-on: [self-hosted, ci]
steps:
- name: Send merge result to slack
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"tag": "${{ needs.make-tag.outputs.tag}}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.MAIN_MERGE_SLACK_HOOK_URL }}