Update from upstream (jito) #17
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
name: Update from upstream (jito) | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
publish: | |
name: Publish new tag | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Get upstream tags | |
uses: dysnix/find-latest-tag@v1 | |
id: upstream | |
with: | |
releases-only: true | |
regex: v2\.[0-9]+\.[0-9]+\-jito$ | |
repository: jito-foundation/jito-solana | |
- name: Get local tags | |
uses: dysnix/find-latest-tag@v1 | |
id: latest | |
with: | |
compared-to-tag: ${{ steps.upstream.outputs.tag }} | |
regex: v2\.[0-9]+\.[0-9]+\-jito$ | |
repository: ${{ github.repository }} | |
- name: Update Dockerfile base | |
if: steps.latest.outputs.newer == 'true' || steps.latest.outputs.tag == '' | |
run: sed -E -i 's/v[0-9]+\.[0-9]+\.[0-9]+\-jito/${{ steps.upstream.outputs.tag }}/g' Dockerfile.jito | |
- name: Create tag | |
if: steps.latest.outputs.newer == 'true' || steps.latest.outputs.tag == '' | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "dysnixbot" | |
git add -A | |
git commit -m "Upstream update ${{ steps.upstream.outputs.tag }}" | |
git push origin ${{ github.ref_name }} | |
git tag ${{ steps.upstream.outputs.tag }} | |
git push origin ${{ steps.upstream.outputs.tag }} |