mirror of
https://github.com/lukaszraczylo/kubemirror.git
synced 2026-06-05 22:43:51 +00:00
b555d84d32
k8s.io/api v0.36.0 requires Go 1.26.0; autoupdate has been failing since 2026-04-23 because setup-go's cached 1.25.9 fell behind.
102 lines
2.8 KiB
YAML
102 lines
2.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
- "docs/**"
|
|
- "examples/**"
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ">=1.26"
|
|
|
|
- name: Install dependencies
|
|
run: go mod download
|
|
|
|
- uses: engineerd/setup-kind@v0.6.2
|
|
|
|
- name: Run e2e tests
|
|
run: |
|
|
# rename context to docker-desktop
|
|
kubectl config rename-context "$(kubectl config current-context)" docker-desktop
|
|
cd e2e
|
|
./run-all-tests.sh
|
|
|
|
release:
|
|
needs: e2e-tests
|
|
uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main
|
|
with:
|
|
go-version: ">=1.26"
|
|
docker-enabled: true
|
|
secrets: inherit
|
|
|
|
publish-helm-chart:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get release version
|
|
id: version
|
|
run: |
|
|
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
|
|
VERSION=${VERSION#v}
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Trigger helm-charts release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
|
RELEASE_VERSION: ${{ steps.version.outputs.version }}
|
|
run: |
|
|
gh api repos/lukaszraczylo/helm-charts/dispatches \
|
|
-f event_type=release-chart \
|
|
-f client_payload[chart_name]=kubemirror \
|
|
-f client_payload[version]="$RELEASE_VERSION" \
|
|
-f client_payload[source_repo]=lukaszraczylo/kubemirror \
|
|
-f client_payload[chart_path]=charts/kubemirror
|
|
|
|
publish-website:
|
|
needs: release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: "./docs"
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|