-
-
Notifications
You must be signed in to change notification settings - Fork 64
59 lines (52 loc) · 1.95 KB
/
charts.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
name: Charts
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the pull request branch
- name: Checkout Code
uses: actions/checkout@v2
- name: Determine Chart Repo
id: helm_chart
run: |
if [[ ${GITHUB_REF} == 'refs/heads/master' ]]; then
echo "bucket_url=s3://cloudposse-charts/" >> $GITHUB_OUTPUT
echo "repo_url=https://charts.cloudposse.com" >> $GITHUB_OUTPUT
else
echo "bucket_url=s3://cloudposse-dev-charts/${GITHUB_REF}/" >> $GITHUB_OUTPUT
echo "repo_url=https://charts.dev.cloudposse.com/${GITHUB_REF}" >> $GITHUB_OUTPUT
fi
env:
GITHUB_REF: ${{ github.ref }}
- name: Build Chart Packages
uses: "docker://cloudposse/build-harness:1.10.0"
with:
args: "-C incubator all"
env:
HELM_CHART_REPO_URL: ${{ steps.helm_chart.outputs.repo_url }}
- name: Generate Index
uses: "docker://cloudposse/build-harness:1.10.0"
with:
args: "-C packages all"
env:
HELM_CHART_REPO_URL: ${{ steps.helm_chart.outputs.repo_url }}
- name: Publish Charts to Chart Repository
if: success() && github.repository == 'cloudposse/charts'
run: aws s3 sync --acl public-read packages/ ${{ steps.helm_chart.outputs.bucket_url }} --exclude '*' --include '*.tgz' --include '*.yaml'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Test
if: success() && github.repository == 'cloudposse/charts'
uses: "docker://cloudposse/build-harness:1.10.0"
with:
args: "-C test all"
env:
HELM_CHART_REPO_URL: ${{ steps.helm_chart.outputs.repo_url }}