-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.19 KB
/
release-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Sync OTP Releases
on:
workflow_dispatch:
schedule:
- cron: '*/15 * * * *'
jobs:
sync-releases:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
working-directory: release_sync
bundler-cache: true
- name: Set GitHub GraphQL Schema Cache Key
id: graphql-cache-key
run: echo "cache-key=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT"
- name: Cache GitHub GraphQL Schema
id: cache-graphql
uses: actions/cache@v3
with:
key: ${{ steps.graphql-cache-key.outputs.cache-key }}
path: |
release_sync/gh-graph.json
- name: Download GitHub GraphQL Schema
working-directory: release_sync
if: steps.cache-graphql.outputs.cache-hit != 'true'
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_KEY }}
run: 'curl -L -o gh-graph.json -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/graphql'
- name: Sync Releases
working-directory: release_sync
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_KEY }}
run: bundle exec rake sync_releases