|
10 | 10 | HELM_VERSION: "3.17.3"
|
11 | 11 |
|
12 | 12 | jobs:
|
13 |
| - # generate-chart-publish: |
14 |
| - # runs-on: ubuntu-latest |
15 |
| - # steps: |
16 |
| - # - uses: actions/checkout@v4 |
17 |
| - # - name: install tools |
18 |
| - # run: | |
19 |
| - # apt update -y |
20 |
| - # apt install -y curl ca-certificates curl gnupg |
21 |
| - # # helm |
22 |
| - # curl -O https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
23 |
| - # tar -xzf helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
24 |
| - # mv linux-amd64/helm /usr/local/bin/ |
25 |
| - # rm -rf linux-amd64 helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
26 |
| - # helm version |
27 |
| - # # docker |
28 |
| - # install -m 0755 -d /etc/apt/keyrings |
29 |
| - # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
30 |
| - # chmod a+r /etc/apt/keyrings/docker.gpg |
31 |
| - # echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null |
32 |
| - # apt update -y |
33 |
| - # apt install -y python3 python3-pip apt-transport-https docker-ce-cli |
34 |
| - # pip install awscli --break-system-packages |
| 13 | + generate-chart-publish: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + - name: install tools |
| 18 | + run: | |
| 19 | + apt update -y |
| 20 | + apt install -y curl ca-certificates curl gnupg |
| 21 | + # helm |
| 22 | + curl -O https://get.helm.sh/helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
| 23 | + tar -xzf helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
| 24 | + mv linux-amd64/helm /usr/local/bin/ |
| 25 | + rm -rf linux-amd64 helm-v${{ env.HELM_VERSION }}-linux-amd64.tar.gz |
| 26 | + helm version |
| 27 | + # docker |
| 28 | + install -m 0755 -d /etc/apt/keyrings |
| 29 | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
| 30 | + chmod a+r /etc/apt/keyrings/docker.gpg |
| 31 | + echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 32 | + apt update -y |
| 33 | + apt install -y python3 python3-pip apt-transport-https docker-ce-cli |
| 34 | + pip install awscli --break-system-packages |
35 | 35 |
|
36 |
| - # - name: Import GPG key |
37 |
| - # id: import_gpg |
38 |
| - # uses: https://github.com/crazy-max/ghaction-import-gpg@v6 |
39 |
| - # with: |
40 |
| - # gpg_private_key: ${{ secrets.GPGSIGN_KEY }} |
41 |
| - # passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} |
42 |
| - # fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0 |
| 36 | + - name: Import GPG key |
| 37 | + id: import_gpg |
| 38 | + uses: https://github.com/crazy-max/ghaction-import-gpg@v6 |
| 39 | + with: |
| 40 | + gpg_private_key: ${{ secrets.GPGSIGN_KEY }} |
| 41 | + passphrase: ${{ secrets.GPGSIGN_PASSPHRASE }} |
| 42 | + fingerprint: CC64B1DB67ABBEECAB24B6455FC346329753F4B0 |
43 | 43 |
|
44 |
| - # # Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843 |
45 |
| - # - name: package chart |
46 |
| - # run: | |
47 |
| - # echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | docker login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} --password-stdin |
48 |
| - # # FIXME: use upstream after https://github.com/technosophos/helm-gpg/issues/1 is solved |
49 |
| - # helm plugin install https://github.com/pat-s/helm-gpg |
50 |
| - # helm dependency build |
51 |
| - # helm package --version "${GITHUB_REF#refs/tags/v}" ./ |
52 |
| - # mkdir gitea |
53 |
| - # mv gitea*.tgz gitea/ |
54 |
| - # curl -s -L -o gitea/index.yaml https://dl.gitea.com/charts/index.yaml |
55 |
| - # helm repo index gitea/ --url https://dl.gitea.com/charts --merge gitea/index.yaml |
56 |
| - # # push to dockerhub |
57 |
| - # echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | helm registry login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} registry-1.docker.io --password-stdin |
58 |
| - # helm push gitea/gitea-${GITHUB_REF#refs/tags/v}.tgz oci://registry-1.docker.io/giteacharts |
59 |
| - # helm registry logout registry-1.docker.io |
| 44 | + # Using helm gpg plugin as 'helm package --sign' has issues with gpg2: https://github.com/helm/helm/issues/2843 |
| 45 | + - name: package chart |
| 46 | + run: | |
| 47 | + echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | docker login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} --password-stdin |
| 48 | + # FIXME: use upstream after https://github.com/technosophos/helm-gpg/issues/1 is solved |
| 49 | + helm plugin install https://github.com/pat-s/helm-gpg |
| 50 | + helm dependency build |
| 51 | + helm package --version "${GITHUB_REF#refs/tags/v}" ./ |
| 52 | + mkdir gitea |
| 53 | + mv gitea*.tgz gitea/ |
| 54 | + curl -s -L -o gitea/index.yaml https://dl.gitea.com/charts/index.yaml |
| 55 | + helm repo index gitea/ --url https://dl.gitea.com/charts --merge gitea/index.yaml |
| 56 | + # push to dockerhub |
| 57 | + echo ${{ secrets.DOCKER_CHARTS_PASSWORD }} | helm registry login -u ${{ secrets.DOCKER_CHARTS_USERNAME }} registry-1.docker.io --password-stdin |
| 58 | + helm push gitea/gitea-${GITHUB_REF#refs/tags/v}.tgz oci://registry-1.docker.io/giteacharts |
| 59 | + helm registry logout registry-1.docker.io |
60 | 60 |
|
61 |
| - # - name: aws credential configure |
62 |
| - # uses: https://github.com/aws-actions/configure-aws-credentials@v4 |
63 |
| - # with: |
64 |
| - # aws-access-key-id: ${{ secrets.AWS_KEY_ID }} |
65 |
| - # aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
66 |
| - # aws-region: ${{ secrets.AWS_REGION }} |
| 61 | + - name: aws credential configure |
| 62 | + uses: https://github.com/aws-actions/configure-aws-credentials@v4 |
| 63 | + with: |
| 64 | + aws-access-key-id: ${{ secrets.AWS_KEY_ID }} |
| 65 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 66 | + aws-region: ${{ secrets.AWS_REGION }} |
67 | 67 |
|
68 |
| - # - name: Copy files to S3 and clear cache |
69 |
| - # run: | |
70 |
| - # aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/ |
| 68 | + - name: Copy files to S3 and clear cache |
| 69 | + run: | |
| 70 | + aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/ |
71 | 71 |
|
72 | 72 | release-gitea:
|
73 | 73 | # needs: generate-chart-publish
|
|
0 commit comments