Skip to content

Commit

Permalink
Add post-merge workflow for running tests and tagging
Browse files Browse the repository at this point in the history
- Create new GitHub Action workflow triggered on merge to main
- Run tests after merge
- Add 'release_test' tag to commit if tests pass
- Force push tag to ensure it's always on latest passing commit
  • Loading branch information
HauwaHakimi committed Nov 6, 2024
1 parent 9dd36cf commit 4d9953f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/post-merge-tests-and-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Tests after Pull Request is merged and Tag

on:
push:
branches:
- main

jobs:
run-tests-and-tag:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0

- name: Run tests
uses: ./.github/workflows/run-tests.yaml

- name: Tag commit if tests pass
if: success()
run: |
git config user.name github-actions
git config user.email [email protected]
git tag -f release_test
git push origin release_test --force

0 comments on commit 4d9953f

Please sign in to comment.