ci: fix and split
This commit is contained in:
parent
5dfeda6e9e
commit
15ff8f9d1a
3 changed files with 75 additions and 84 deletions
13
.forgejo/actions/setup-node/action.yml
Normal file
13
.forgejo/actions/setup-node/action.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
# action.yml
|
||||
name: setup-node
|
||||
description: 'setup node'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: 'npm'
|
||||
- shell: bash
|
||||
run: npm ci
|
25
.forgejo/actions/setup/action.yml
Normal file
25
.forgejo/actions/setup/action.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
# action.yml
|
||||
name: setup
|
||||
description: 'setup system'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- shell: bash
|
||||
name: create cache
|
||||
run: |
|
||||
mkdir -p /opt/hostedtoolcache
|
||||
- shell: bash
|
||||
name: install deps
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
make \
|
||||
python3 \
|
||||
python3-wheel \
|
||||
python3-venv \
|
||||
unzip \
|
||||
;
|
|
@ -25,24 +25,13 @@ jobs:
|
|||
steps:
|
||||
- run: cat /etc/os-release
|
||||
|
||||
- name: install deps
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq \
|
||||
make \
|
||||
;
|
||||
mkdir -p /opt/hostedtoolcache
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: 'npm'
|
||||
- uses: ./.forgejo/actions/setup
|
||||
- uses: ./.forgejo/actions/setup-node
|
||||
|
||||
- run: npm ci
|
||||
- run: npm run prettier
|
||||
- run: npx markdownlint-cli .
|
||||
- run: make readme
|
||||
|
@ -53,37 +42,25 @@ jobs:
|
|||
steps:
|
||||
- run: cat /etc/os-release
|
||||
|
||||
- name: install deps
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq \
|
||||
make \
|
||||
python3 \
|
||||
python3-wheel \
|
||||
python3-venv \
|
||||
unzip \
|
||||
;
|
||||
mkdir -p /opt/hostedtoolcache
|
||||
|
||||
- name: install helm
|
||||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||
with:
|
||||
version: v3.13.2 # renovate: datasource=github-releases depName=helm packageName=helm/helm
|
||||
|
||||
- run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
||||
|
||||
- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
|
||||
|
||||
- name: install chart-testing
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||
with:
|
||||
version: v3.10.1 # renovate: datasource=github-releases depName=chart-testing packageName=helm/chart-testing
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ./.forgejo/actions/setup
|
||||
|
||||
- name: install helm ${{ env.HELM_VERSION }}
|
||||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||
with:
|
||||
version: ${{ env.HELM_VERSION }}
|
||||
|
||||
- run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
||||
|
||||
- name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||
with:
|
||||
version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||
|
||||
- run: helm dependency build
|
||||
|
||||
- run: yamllint -f colored .
|
||||
|
@ -105,20 +82,13 @@ jobs:
|
|||
steps:
|
||||
- run: cat /etc/os-release
|
||||
|
||||
- name: install deps
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
make \
|
||||
python3 \
|
||||
python3-wheel \
|
||||
python3-venv \
|
||||
unzip \
|
||||
;
|
||||
mkdir -p /opt/hostedtoolcache
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ./.forgejo/actions/setup
|
||||
- uses: ./.forgejo/actions/setup-node
|
||||
|
||||
- name: install docker
|
||||
run: |
|
||||
|
@ -144,13 +114,6 @@ jobs:
|
|||
# chmod +x /usr/local/bin/kind
|
||||
# kind --version
|
||||
|
||||
# - name: install helm ${{ env.HELM_VERSION }}
|
||||
# run: |
|
||||
# curl -LO "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
||||
# tar --strip 1 -C "/usr/local/bin" -xf "helm-${HELM_VERSION}-linux-amd64.tar.gz" linux-amd64/helm
|
||||
# rm "helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
||||
# helm --version
|
||||
|
||||
# - name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||
# run: |
|
||||
# curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||
|
@ -160,28 +123,21 @@ jobs:
|
|||
# rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||
# ct --version
|
||||
|
||||
- uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # v3.1.2
|
||||
|
||||
- name: Install chart-testing
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||
with:
|
||||
version: v3.10.1 # renovate: datasource=github-releases depName=chart-testing packageName=helm/chart-testing
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 0
|
||||
|
||||
- run: docker info
|
||||
|
||||
- name: Create kind ${{ matrix.k8s }} cluster
|
||||
- name: Create ${{ matrix.k8s }} cluster with kind ${{ env.KIND_VERSION }}
|
||||
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
|
||||
with:
|
||||
node_image: kindest/node:${{ matrix.k8s }}
|
||||
version: v0.20.0 # renovate: datasource=github-releases depName=kind packageName=kubernetes-sigs/kind
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
|
||||
- run: kubectl get no -o wide
|
||||
|
||||
- name: Install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||
with:
|
||||
version: ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||
|
||||
# Catch-all required check for test matrix
|
||||
test-success:
|
||||
needs:
|
||||
|
@ -216,23 +172,20 @@ jobs:
|
|||
if: ${{ github.ref_type == 'tag' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- uses: ./.forgejo/actions/setup
|
||||
- uses: ./.forgejo/actions/setup-node
|
||||
|
||||
- name: install helm
|
||||
uses: https://github.com/azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||
with:
|
||||
version: v3.13.2 # renovate: datasource=github-releases depName=helm packageName=helm/helm
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: 'npm'
|
||||
|
||||
- run: helm dependency build
|
||||
- run: helm package --version "${GITHUB_REF_NAME#v}" -d tmp/ ./
|
||||
- run: npm ci
|
||||
|
||||
- name: login to codeberg packages
|
||||
run: echo ${TOKEN} | helm registry login -u viceice --password-stdin codeberg.org/forgejo-contrib
|
||||
|
|
Loading…
Reference in a new issue