Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from MonolithProjects/feat/rework_workflow
Browse files Browse the repository at this point in the history
Feat/rework workflow
  • Loading branch information
MonolithProjects authored Dec 27, 2022
2 parents 58cc4f0 + 93406d2 commit 5610ae5
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/latest_tailscale_release.yml
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

0 comments on commit 5610ae5

Please sign in to comment.