Skip to content

Commit 7f96084

Browse files
committed
ci: fully re-enable release-workflow
1 parent 5292684 commit 7f96084

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

.gitea/workflows/release-version.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,64 +10,64 @@ env:
1010
HELM_VERSION: "3.17.3"
1111

1212
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
3535
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
4343

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
6060
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 }}
6767

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/
7171
7272
release-gitea:
7373
# needs: generate-chart-publish

0 commit comments

Comments
 (0)