add namada
This commit is contained in:
parent
02b660a6dc
commit
6255b08ef8
@ -1 +1,42 @@
|
||||
todo
|
||||
name: Check Latest Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/5 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
TARGET_REPO: zramsay/namada-interface
|
||||
|
||||
jobs:
|
||||
check-latest:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
run_workflow: ${{ steps.check.outputs.run_workflow }}
|
||||
steps:
|
||||
- name: Get latest release
|
||||
id: check
|
||||
run: |
|
||||
latest=$(curl -s https://api.github.com/repos/${{ env.TARGET_REPO }}/releases/latest)
|
||||
latest_tag=$(echo $latest | jq -r .tag_name)
|
||||
published_at=$(echo $latest | jq -r .published_at)
|
||||
|
||||
current_time=$(date -u +%s)
|
||||
release_time=$(date -u -d "$published_at" +%s)
|
||||
time_diff=$((current_time - release_time))
|
||||
|
||||
if [ $time_diff -le 300 ]; then
|
||||
echo "run_workflow=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "run_workflow=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
main_workflow:
|
||||
needs: check-latest
|
||||
if: needs.check-latest.outputs.run_workflow == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Example step
|
||||
run: echo "Running workflow for new release"
|
||||
|
Loading…
Reference in New Issue
Block a user