Compare commits
10 Commits
5308b0f2aa
...
4a9d85d9e7
Author | SHA1 | Date | |
---|---|---|---|
4a9d85d9e7 | |||
a4805b5b6c | |||
6b67657897 | |||
bd7c145e0d | |||
98a96a6a24 | |||
e39637d227 | |||
54f9c42826 | |||
377e1671c2 | |||
12a4cb58e0 | |||
191ba2b20d |
@ -2,14 +2,46 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 9 * * 0"
|
- cron: "0 9 * * 0"
|
||||||
- cron: "0 0 * * *" # Testing
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check_manual_trigger:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Log event metadata
|
||||||
|
run: |
|
||||||
|
echo "Issue: ${{ gitea.event.issue.number }}"
|
||||||
|
echo "Comment: ${{ gitea.event.comment.body }}"
|
||||||
|
echo "User: ${{ gitea.event.comment.user.login }}"
|
||||||
|
|
||||||
|
- name: Stop workflow if required conditions are not met
|
||||||
|
if: ${{ !contains(gitea.event.issue.number, '436') || !contains(gitea.event.comment.body, '/trigger-release') || !contains(gitea.event.comment.user.login, 'luke') }}
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
get_latest_tag:
|
||||||
|
name: Get latest tag
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: check_manual_trigger
|
||||||
|
outputs:
|
||||||
|
latesttag: ${{ steps.latesttag.outputs.latesttag }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.1.7
|
||||||
|
- name: Get latest tag
|
||||||
|
id: latesttag
|
||||||
|
run: |
|
||||||
|
git fetch --tags
|
||||||
|
echo "latesttag=$(git describe --tags --abbrev=0)" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
uses: https://git.tainton.uk/public/webexmemebot/src/branch/main/.gitea/workflows/ci.yml
|
name: Unit Test
|
||||||
|
needs: get_latest_tag
|
||||||
|
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: test
|
||||||
outputs:
|
outputs:
|
||||||
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
success: ${{ steps.set_flag.outputs.success }}
|
||||||
|
Loading…
Reference in New Issue
Block a user