-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1.14 KB
/
refresh-repositories.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
name: CI
on:
push:
branches:
- main
# schedule:
# * is a special character in YAML so you have to quote this string
# - cron: '*/15 * * * *'
jobs:
refresh:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Fetch repositories
shell: bash
env:
TOKEN: ${{ secrets.ARTIFACT_HUB_TOKEN }}
API_KEY: ${{ secrets.ARTIFACT_HUB_API_KEY_ID }}
SECRET_KEY: ${{ secrets.ARTIFACT_HUB_API_KEY_SECRET }}
run: |
curl --fail -X GET "https://artifacthub.io/api/v1/repositories/helm" -H "accept: application/json" -H "X-API-KEY-ID: $API_KEY" -H "X-API-KEY-SECRET: $SECRET_KEY" -o repositories.json
- name: Output repositories.json
shell: bash
run: |
cat repositories.json
- name: Upload repositories.json to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: repositories.json
tag: latest
overwrite: true
file_glob: true