-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.96 KB
/
lint-and-push-to-registry.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This workflow will (lint helm charts in packs and then) push the packs to the configured Pack Repository
name: Push packs to repo
on:
push:
branches:
- "main"
workflow_dispatch:
env:
PACK_REGISTRY: "packs-spectro.dreamworx.nl"
jobs:
# lint:
# permissions:
# contents: read
# runs-on: ubuntu-latest
# steps:
# - name: Helm tool installer
# uses: Azure/setup-helm@v3
# - name: Checkout repo
# uses: actions/checkout@v3
# - name: Lint all Helm charts found in repo
# run: |
# shopt -s globstar
# ( for d in **/charts/*/; do helm lint $d --with-subcharts; if [ $? == 1 ]; then exit 1; fi; done )
push:
permissions:
contents: read
runs-on: ubuntu-latest
#needs: lint
steps:
- name: Install Spectro CLI
run: |
wget -q https://spectro-cli.s3.amazonaws.com/v2.6.0/linux/spectro
chmod +x spectro
sudo mv spectro /usr/local/bin/
spectro version
- name: Login to Spectro Pack Registry
env:
PACK_USER: ${{ secrets.PACK_USER }}
PACK_PASSWORD: ${{ secrets.PACK_PASSWORD }}
run: |
echo "$PACK_PASSWORD" | spectro registry login $PACK_REGISTRY --username $PACK_USER --password-stdin
- name: Checkout repo
uses: actions/checkout@v3
- name: Push packs to Spectro Pack Registry
env:
PACK_USER: ${{ secrets.PACK_USER }}
PACK_PASSWORD: ${{ secrets.PACK_PASSWORD }}
run: |
find stable -maxdepth 1 -mindepth 1 -type d -print0 | xargs -0 -n1 -I {} spectro pack push {} -r $PACK_REGISTRY -f -m "Force pushed by Github Action"
- name: Trigger registry sync in Palette
env:
SC_API_KEY: ${{ secrets.SC_API_KEY }}
run: |
curl -s -X POST \
-H "ApiKey:$SC_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
"https://api.spectrocloud.com/v1/registries/pack/64cbb11ccd8804c7daa9543b/sync"