Use Gitea Actions for release publishing (#436)
Co-authored-by: pat-s <pat-s@noreply.gitea.io> Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/436 Reviewed-by: pat-s <pat-s@noreply.gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-committed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
9f0b65f386
commit
7434556b37
49
.drone.yml
49
.drone.yml
|
@ -45,52 +45,3 @@ steps:
|
||||||
image: cytopia/yamllint:alpine-1
|
image: cytopia/yamllint:alpine-1
|
||||||
commands:
|
commands:
|
||||||
- yamllint -f colored .
|
- yamllint -f colored .
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: release-version
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: generate-chart
|
|
||||||
pull: always
|
|
||||||
image: alpine:3.17
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
|
|
||||||
- apk add --no-cache curl
|
|
||||||
- helm dependency update
|
|
||||||
- helm package --version "${DRONE_TAG##v}" ./
|
|
||||||
- mkdir gitea
|
|
||||||
- mv gitea*.tgz gitea/
|
|
||||||
- curl -L -o gitea/index.yaml https://dl.gitea.io/charts/index.yaml
|
|
||||||
- helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml
|
|
||||||
|
|
||||||
- name: upload-chart
|
|
||||||
pull: always
|
|
||||||
image: plugins/s3:latest
|
|
||||||
settings:
|
|
||||||
acl:
|
|
||||||
from_secret: aws_s3_acl
|
|
||||||
region:
|
|
||||||
from_secret: aws_s3_region
|
|
||||||
bucket:
|
|
||||||
from_secret: aws_s3_bucket
|
|
||||||
endpoint:
|
|
||||||
from_secret: aws_s3_endpoint
|
|
||||||
path_style:
|
|
||||||
from_secret: aws_s3_path_style
|
|
||||||
access_key:
|
|
||||||
from_secret: aws_access_key_id
|
|
||||||
secret_key:
|
|
||||||
from_secret: aws_secret_access_key
|
|
||||||
source: gitea/*
|
|
||||||
target: /charts
|
|
||||||
strip_prefix: gitea/
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: generate-chart
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate-chart-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: install tools
|
||||||
|
run: |
|
||||||
|
apt update -y
|
||||||
|
apt install -y curl helm python python3-pip
|
||||||
|
pip install awscli
|
||||||
|
- name: package chart
|
||||||
|
run: |
|
||||||
|
helm dependency update
|
||||||
|
helm package --version "${GITHUB_REF#refs/tags/v}" ./
|
||||||
|
mkdir gitea
|
||||||
|
mv gitea*.tgz gitea/
|
||||||
|
curl -L -o gitea/index.yaml https://dl.gitea.com/charts/index.yaml
|
||||||
|
helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml
|
||||||
|
- name: aws credential configure
|
||||||
|
uses: https://github.com/aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
|
||||||
|
aws-region: ${{ secrets.AWS_REGION }}
|
||||||
|
- name: install aws cli
|
||||||
|
run: |
|
||||||
|
apt update -y &&
|
||||||
|
pip install awscli
|
||||||
|
- name: Copy files to S3 and clear cache
|
||||||
|
run: |
|
||||||
|
aws s3 sync gitea/ s3://${{ secrets.AWS_S3_BUCKET}}/charts/
|
Loading…
Reference in New Issue