Skip to content

update actions/checkout to v4 and add fetch-tags #7

update actions/checkout to v4 and add fetch-tags

update actions/checkout to v4 and add fetch-tags #7

on:
push:
branches: ['main']
schedule:
- cron: '0 0 * * *'
jobs:
update_tap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Get upstream release
id: upstreamRelease
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: small-hack/smol-k8s-lab
- name: Get local tag
id: localTag
run: |
echo "tag=`echo $(git describe --tags --abbrev=0)`"
echo "tag=`echo $(git describe --tags --abbrev=0)`" >> "$GITHUB_OUTPUT"
- name: Update Release
run: |
sed -i 's/${{ steps.localTag.outputs.tag }}/${{ steps.upstreamRelease.outputs.release }}/g' ./Formula/smol-k8s-lab.rb
cat ./Formula/smol-k8s-lab.rb