try using git describe instead of git tag #6
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
on: | |
push: | |
branches: ['main'] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
update_tap: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 |