Skip to content

Check upstream for new actions #53929

Check upstream for new actions

Check upstream for new actions #53929

Workflow file for this run

name: Check upstream for new actions
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
upstream:
name: Upstream
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
id: go
with:
go-version: 1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: update jq
run: |
sudo curl -L -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
sudo chmod +x /usr/bin/jq
jq -V
- name: Run it
run: go run main.go -- generate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Commit files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
AWS_REGION: us-east-1
run: |
set -eux
git config --local user.email "[email protected]"
git config --local user.name "Aidan bot"
git add .
git commit -m "New actions" -a || exit 0
remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:master
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/purge_cache" \
-H "Authorization: Bearer $CLOUDFLARE_TOKEN" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
# go run main.go -- publish