-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (74 loc) · 2.49 KB
/
pkg.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
70
71
72
73
74
75
76
77
78
# ---------------------------------------------------------------------------------------
# Title: Continuous Delivery (Packaging)
#
# Requirements:
# - Create manually "gh-pages" branch
# - Maintain pages files in "gh-pages" branch: index.tpl, placeholder.png
#
# Uses:
# - https://github.com/helm/chart-releaser-action
# - https://github.com/halkeye/helm-repo-html
# ---------------------------------------------------------------------------------------
name: PKG
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
# https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 3.10.1
- name: Add dependency chart repositories
run: ./scripts/add_helm_repo.sh
- name: Host charts repository on GitHub Pages
uses: helm/chart-releaser-action@v1.5.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# important: it needs to be done in the same pipeline as another pages workflow won't be triggered by the pust on the gh-pages branch
# (tried with a PAT and several options but didn't work)
- name: Checkout gh-pages branch
uses: actions/checkout@v3.1.0
with:
ref: gh-pages
- name: Setup Go environment
uses: actions/setup-go@v3.3.1
- name: Generate index.html
run: |
go install github.com/halkeye/helm-repo-html@v0.0.8
/home/runner/go/bin/helm-repo-html
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1