-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.61 KB
/
croc-update.yml
File metadata and controls
44 lines (38 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update croc
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-croc:
name: Update croc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch latest croc release
id: croc
run: |
echo "release_tag=$(curl -sL https://api.github.com/repos/schollz/croc/releases/latest | jq -r '.tag_name' | cut -c 2-)" >> $GITHUB_OUTPUT
echo "current_tag=$(< croc.version)" >> $GITHUB_OUTPUT
- name: Update croc version
if: steps.croc.outputs.current_tag != steps.croc.outputs.release_tag
run: |
echo ${{ steps.croc.outputs.release_tag }} > croc.version
- name: Create pull request
if: steps.croc.outputs.current_tag != steps.croc.outputs.release_tag
uses: peter-evans/create-pull-request@v4
with:
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit-message: Update croc from ${{ steps.croc.outputs.current_tag }} to ${{ steps.croc.outputs.release_tag }}
title: Update croc from ${{ steps.croc.outputs.current_tag }} to ${{ steps.croc.outputs.release_tag }}
body: |
Updates [schollz/croc](https://github.com/schollz/croc) from ${{ steps.croc.outputs.current_tag }} to ${{ steps.croc.outputs.release_tag }}
labels: |
🛶 upstream
🤖 bot
branch: schollz/croc-${{ steps.croc.outputs.release_tag }}
delete-branch: true