Update MFT files #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update MFT files | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" # Run every day at 1am UTC | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
permissions: | |
contents: write | |
jobs: | |
update: | |
name: Update MFT files | |
runs-on: [ ubuntu-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-tags: true | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Generate MFT files | |
run: go run . | |
- name: Get next version | |
uses: reecetech/[email protected] | |
id: version | |
with: | |
scheme: calver | |
increment: patch | |
- name: Commit changes | |
id: auto-commit-action | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update MFT files | |
tagging_message: ${{ steps.version.outputs.version }} | |
- name: Notify on Pushover | |
if: ${{ steps.auto-commit-action.outputs.changes_detected }} | |
uses: umahmood/pushover-actions@main | |
env: | |
PUSHOVER_TOKEN: ${{ secrets.PUSHOVER_TOKEN }} | |
PUSHOVER_USER: ${{ secrets.PUSHOVER_USER }} | |
with: | |
status: ${{ job.status }} | |
title: New MFT files have been generated. | |
url: ${{ github.server_url }}/${{ github.repository }} |