This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from MonolithProjects/feat/rework_workflow
Feat/rework workflow
- Loading branch information
Showing
1 changed file
with
14 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
name: Find Tailscale version | ||
on: | ||
schedule: | ||
- cron: '0 3 * * 1' | ||
- cron: '0 3 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
get-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Fetch laste Tailscale version | ||
id: tailscale-check | ||
run: | | ||
curl -sL https://api.github.com/repos/tailscale/tailscale/releases/latest | \ | ||
jq -r ".tag_name" > tailscale-versions/tailscale-latest.txt | ||
echo ::set-output name=version::$(cat tailscale-versions/tailscale-latest.txt) | ||
echo "tailscale-version=$(cat tailscale-versions/tailscale-latest.txt)" >> $GITHUB_OUTPUT | ||
- name: Check for modified files | ||
id: git-check | ||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") | ||
run: echo "modified=$([ -z "$(git status --porcelain)" ] && echo "false" || echo "true")" >> $GITHUB_OUTPUT | ||
|
||
- name: Commit latest release version | ||
if: steps.git-check.outputs.modified == 'true' | ||
uses: github-actions-x/commit@v2.9 | ||
if: steps.tailscale-check.outputs.modified == 'true' | ||
uses: actions-x/commit@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
push-branch: 'main' | ||
commit-message: 'Add Tailscale release ${{ steps.tailscale-check.outputs.version }}' | ||
force-add: 'true' | ||
files: tailscale-versions/tailscale-latest.txt | ||
name: MonolithProjects | ||
email: [email protected] | ||
name: GitHub Actions Autocommit | ||
branch: main | ||
message: "Add Tailscale release ${{ steps.tailscale-check.outputs.tailscale-version }}" | ||
force: true | ||
directory: tailscale-versions |