Commit d316a59e authored by Ivan Vandot's avatar Ivan Vandot Committed by GitHub

add scheduled run for infra-test (#876)

parent b4101ca8
name: Scheduled Infra Test
on:
schedule:
- cron: 0 1 * * *
jobs:
infra-test:
runs-on: ubuntu-latest
steps:
- name: Activity check
run: |
COMMIT=$(curl -s https://api.github.com/repos/ethersphere/bee/commits | jq -r '.[0]')
AUTHOR=$(jq -r '.commit.author.name' <<<$COMMIT)
URL=$(jq -r '.html_url' <<<$COMMIT)
DAYS=$(( ( $(date --utc +%s) - $(date --utc -d $(jq -r '.commit.author.date' <<<$COMMIT) +%s)) / 86400 ))
if [ $DAYS -eq 0 ]; then
echo "There are new commits..."
echo "Last commit from $AUTHOR, URL => $URL"
echo ::set-env name=GHA_REPO_RUN::true
else
echo "No new commits, exiting..."
echo ::set-env name=GHA_REPO_RUN::false
fi
- name: Trigger ArgoCD
if: env.GHA_REPO_RUN == 'true'
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_GHA_PAT }}
repository: ethersphere/bee-argo
event-type: trigger-install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment