mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-02-05 08:17:59 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
721c12a758 | ||
|
|
9f63cbbb5a | ||
|
|
e8e911fea1 | ||
|
|
2b23300f25 | ||
|
|
53c5c8223c | ||
|
|
96ea3a5d1f | ||
|
|
159b87d593 |
4
.github/workflows/pull-requests-release.yaml
vendored
4
.github/workflows/pull-requests-release.yaml
vendored
@@ -68,8 +68,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Create tag on merged commit
|
- name: Create tag on merged commit
|
||||||
run: |
|
run: |
|
||||||
git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }}
|
git tag ${{ steps.get_tag.outputs.tag }} ${{ github.sha }} --force
|
||||||
git push origin ${{ steps.get_tag.outputs.tag }}
|
git push origin ${{ steps.get_tag.outputs.tag }} --force
|
||||||
|
|
||||||
- name: Publish draft release
|
- name: Publish draft release
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
|
|||||||
73
.github/workflows/tags.yaml
vendored
73
.github/workflows/tags.yaml
vendored
@@ -1,6 +1,7 @@
|
|||||||
name: Versioned Tag
|
name: Versioned Tag
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Trigger on push if it includes a tag like vX.Y.Z
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
@@ -15,6 +16,7 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# 1) Check if a non-draft release with this tag already exists
|
||||||
- name: Check if release already exists
|
- name: Check if release already exists
|
||||||
id: check_release
|
id: check_release
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
@@ -25,7 +27,6 @@ jobs:
|
|||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo
|
repo: context.repo.repo
|
||||||
});
|
});
|
||||||
|
|
||||||
const existing = releases.data.find(r => r.tag_name === tag && !r.draft);
|
const existing = releases.data.find(r => r.tag_name === tag && !r.draft);
|
||||||
if (existing) {
|
if (existing) {
|
||||||
core.setOutput('skip', 'true');
|
core.setOutput('skip', 'true');
|
||||||
@@ -33,10 +34,39 @@ jobs:
|
|||||||
core.setOutput('skip', 'false');
|
core.setOutput('skip', 'false');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If a published release already exists, skip the rest of the workflow
|
||||||
- name: Skip if release already exists
|
- name: Skip if release already exists
|
||||||
if: steps.check_release.outputs.skip == 'true'
|
if: steps.check_release.outputs.skip == 'true'
|
||||||
run: echo "Release already exists, skipping workflow."
|
run: echo "Release already exists, skipping workflow."
|
||||||
|
|
||||||
|
# 2) Determine the base branch from which the tag was pushed
|
||||||
|
- name: Get base branch
|
||||||
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
|
id: get_base
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
/*
|
||||||
|
For a push event with a tag, GitHub sets context.payload.base_ref
|
||||||
|
if the tag was pushed from a branch.
|
||||||
|
If it's empty, we can't determine the correct base branch and must fail.
|
||||||
|
*/
|
||||||
|
const baseRef = context.payload.base_ref;
|
||||||
|
if (!baseRef) {
|
||||||
|
core.setFailed(`❌ base_ref is empty. Make sure you push the tag from a branch (e.g. 'git push origin HEAD:refs/tags/vX.Y.Z').`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const shortBranch = baseRef.replace("refs/heads/", "");
|
||||||
|
const releasePattern = /^release-\d+\.\d+$/;
|
||||||
|
if (shortBranch !== "main" && !releasePattern.test(shortBranch)) {
|
||||||
|
core.setFailed(`❌ Tagged commit must belong to branch 'main' or 'release-X.Y'. Got '${shortBranch}'`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
core.setOutput('branch', shortBranch);
|
||||||
|
|
||||||
|
# 3) Checkout full git history and tags
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -44,6 +74,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
|
|
||||||
|
# 4) Login to GitHub Container Registry
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@@ -52,21 +83,24 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
||||||
|
# 5) Build project artifacts
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
run: make build
|
run: make build
|
||||||
|
|
||||||
|
# 6) Optionally commit built artifacts to the repository
|
||||||
- name: Commit release artifacts
|
- name: Commit release artifacts
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
env:
|
env:
|
||||||
GIT_AUTHOR_NAME: ${{ github.actor }}
|
GIT_AUTHOR_NAME: ${{ github.actor }}
|
||||||
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
|
GIT_AUTHOR_EMAIL: ${{ github.actor }}@users.noreply.github.com
|
||||||
run: |
|
run: |
|
||||||
git config user.name "$GIT_AUTHOR_NAME"
|
git config user.name "github-actions"
|
||||||
git config user.email "$GIT_AUTHOR_EMAIL"
|
git config user.email "github-actions@github.com"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit"
|
git commit -m "Prepare release ${GITHUB_REF#refs/tags/}" -s || echo "No changes to commit"
|
||||||
|
|
||||||
|
# 7) Create a release branch like release-X.Y.Z
|
||||||
- name: Create release branch
|
- name: Create release branch
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
run: |
|
run: |
|
||||||
@@ -74,48 +108,48 @@ jobs:
|
|||||||
git branch -f "$BRANCH_NAME"
|
git branch -f "$BRANCH_NAME"
|
||||||
git push origin "$BRANCH_NAME" --force
|
git push origin "$BRANCH_NAME" --force
|
||||||
|
|
||||||
|
# 8) Create a pull request from release-X.Y.Z to the original base branch
|
||||||
- name: Create pull request if not exists
|
- name: Create pull request if not exists
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
uses: actions/github-script@v7
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const version = context.ref.replace('refs/tags/v', '');
|
const version = context.ref.replace('refs/tags/v', '');
|
||||||
const branch = `release-${version}`;
|
const base = '${{ steps.get_base.outputs.branch }}';
|
||||||
const base = 'main';
|
const head = `release-${version}`;
|
||||||
|
|
||||||
const prs = await github.rest.pulls.list({
|
const prs = await github.rest.pulls.list({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
head: `${context.repo.owner}:${branch}`,
|
head: `${context.repo.owner}:${head}`,
|
||||||
base
|
base
|
||||||
});
|
});
|
||||||
|
|
||||||
if (prs.data.length === 0) {
|
if (prs.data.length === 0) {
|
||||||
const newPr = await github.rest.pulls.create({
|
const newPr = await github.rest.pulls.create({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
head: branch,
|
head,
|
||||||
base: base,
|
base,
|
||||||
title: `Release v${version}`,
|
title: `Release v${version}`,
|
||||||
body:
|
body:
|
||||||
`This PR prepares the release \`v${version}\`.\n` +
|
`This PR prepares the release \`v${version}\`.\n` +
|
||||||
`(Please merge it before releasing draft)`,
|
`(Please merge it before releasing draft)`,
|
||||||
draft: false
|
draft: false
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`Created pull request #${newPr.data.number} from ${branch} to ${base}`);
|
console.log(`Created pull request #${newPr.data.number} from ${head} to ${base}`);
|
||||||
|
|
||||||
await github.rest.issues.addLabels({
|
await github.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: newPr.data.number,
|
issue_number: newPr.data.number,
|
||||||
labels: ['release']
|
labels: ['release']
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log(`Pull request already exists from ${branch} to ${base}`);
|
console.log(`Pull request already exists from ${head} to ${base}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 9) Create or reuse an existing draft GitHub release for this tag
|
||||||
- name: Create or reuse draft release
|
- name: Create or reuse draft release
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -141,22 +175,21 @@ jobs:
|
|||||||
}
|
}
|
||||||
core.setOutput('upload_url', release.upload_url);
|
core.setOutput('upload_url', release.upload_url);
|
||||||
|
|
||||||
|
# 10) Build additional assets for the release (if needed)
|
||||||
- name: Build assets
|
- name: Build assets
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
run: make assets
|
run: make assets
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# 11) Upload assets to the draft release
|
||||||
- name: Upload assets
|
- name: Upload assets
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
run: make upload_assets VERSION=${GITHUB_REF#refs/tags/}
|
run: make upload_assets VERSION=${GITHUB_REF#refs/tags/}
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Delete pushed tag
|
# 12) Run tests
|
||||||
if: steps.check_release.outputs.skip == 'false'
|
|
||||||
run: |
|
|
||||||
git push --delete origin ${GITHUB_REF#refs/tags/}
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
if: steps.check_release.outputs.skip == 'false'
|
||||||
run: make test
|
run: make test
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.17.1@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3
|
ghcr.io/cozystack/cozystack/cluster-autoscaler:0.18.0@sha256:85371c6aabf5a7fea2214556deac930c600e362f92673464fe2443784e2869c3
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.17.1@sha256:795d8e1ef4b2b0df2aa1e09d96cd13476ebb545b4bf4b5779b7547a70ef64cf9
|
ghcr.io/cozystack/cozystack/kubevirt-cloud-provider:0.18.0@sha256:795d8e1ef4b2b0df2aa1e09d96cd13476ebb545b4bf4b5779b7547a70ef64cf9
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.17.1@sha256:d1346d59224e6d2d07f1551af918ed31e57ba84b750122c1aeceaf9b33dd2271
|
ghcr.io/cozystack/cozystack/kubevirt-csi-driver:0.18.0@sha256:5717919c75e609902c6d67138311a2a8fd07be822e2173f3802b67cf5f3486e9
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
cozystack:
|
cozystack:
|
||||||
image: ghcr.io/cozystack/cozystack/installer:v0.30.1@sha256:29b975e1485efa98965d292d772efc11966724fef2f9b70612e398dff0eded5b
|
image: ghcr.io/cozystack/cozystack/installer:v0.30.3@sha256:2bf1ab99eaa4c005d6941e2f826a18e0748d22b1e34a209e2ce058d88dbc6f5e
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
e2e:
|
e2e:
|
||||||
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.1@sha256:04dcc6161e9bdb4d30538e3706bb29c93c1d615c6f3d940f9af64d3dda2f491e
|
image: ghcr.io/cozystack/cozystack/e2e-sandbox:v0.30.3@sha256:f65ee54ab3b1b001baa059d864d42b0752d083a99da86980ac0ef26b77274a14
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/matchbox:v0.30.1@sha256:a30e58f07c702e693f9bc052c3ef6eab443e1db8bcc86689199b2db6af14ebb7
|
ghcr.io/cozystack/cozystack/matchbox:v0.30.3@sha256:f4ea1f49f46766fbb903af083a6c2f9bf948fce29ed7378228d3d7fb9c417281
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/grafana:1.9.2@sha256:fb48d37f1a9386e0023df9ac067ec2e03953b7b8c9d6abf2d12716e084f846a4
|
ghcr.io/cozystack/cozystack/grafana:1.9.2@sha256:c63978e1ed0304e8518b31ddee56c4e8115541b997d8efbe1c0a74da57140399
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:3537d3baaf96d576148e6df17552f2ead2b7a55ba122ef542a2e99bde896d218
|
ghcr.io/cozystack/cozystack/s3manager:v0.5.0@sha256:f9722faab519004750bd459016edf6b1f6e8a46f059e4234f78b3c93e843a591
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
cozystackAPI:
|
cozystackAPI:
|
||||||
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.30.1@sha256:7ef370dc8aeac0a6b2a50b7d949f070eb21d267ba0a70e7fc7c1564bfe6d4f83
|
image: ghcr.io/cozystack/cozystack/cozystack-api:v0.30.3@sha256:7ef370dc8aeac0a6b2a50b7d949f070eb21d267ba0a70e7fc7c1564bfe6d4f83
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
cozystackController:
|
cozystackController:
|
||||||
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.30.1@sha256:5b87a8ea0dcde1671f44532c1ee6db11a5dd922d1a009078ecf6495ec193e52a
|
image: ghcr.io/cozystack/cozystack/cozystack-controller:v0.30.3@sha256:9e5c35b2ba81527db7b0ad3fde7829f2c66999db1cc48eb11a3396b37e3a96be
|
||||||
debug: false
|
debug: false
|
||||||
disableTelemetry: false
|
disableTelemetry: false
|
||||||
cozystackVersion: "v0.30.1"
|
cozystackVersion: "v0.30.3"
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ data:
|
|||||||
"kubeappsNamespace": {{ .Release.Namespace | quote }},
|
"kubeappsNamespace": {{ .Release.Namespace | quote }},
|
||||||
"helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }},
|
"helmGlobalNamespace": {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }},
|
||||||
"carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }},
|
"carvelGlobalNamespace": {{ .Values.kubeappsapis.pluginConfig.kappController.packages.v1alpha1.globalPackagingNamespace | quote }},
|
||||||
"appVersion": "v0.30.1",
|
"appVersion": "v0.30.3",
|
||||||
"authProxyEnabled": {{ .Values.authProxy.enabled }},
|
"authProxyEnabled": {{ .Values.authProxy.enabled }},
|
||||||
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
|
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
|
||||||
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},
|
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ kubeapps:
|
|||||||
image:
|
image:
|
||||||
registry: ghcr.io/cozystack/cozystack
|
registry: ghcr.io/cozystack/cozystack
|
||||||
repository: dashboard
|
repository: dashboard
|
||||||
tag: v0.30.1
|
tag: v0.30.3
|
||||||
digest: "sha256:a83fe4654f547469cfa469a02bda1273c54bca103a41eb007fdb2e18a7a91e93"
|
digest: "sha256:a83fe4654f547469cfa469a02bda1273c54bca103a41eb007fdb2e18a7a91e93"
|
||||||
kubeappsapis:
|
kubeappsapis:
|
||||||
image:
|
image:
|
||||||
registry: ghcr.io/cozystack/cozystack
|
registry: ghcr.io/cozystack/cozystack
|
||||||
repository: kubeapps-apis
|
repository: kubeapps-apis
|
||||||
tag: v0.30.1
|
tag: v0.30.3
|
||||||
digest: "sha256:5019c8fc4a5d4437cae32a635303ceebcb489c582092fd4bcfc04353b4582233"
|
digest: "sha256:7adf289c4801d81087d176bd7e3344fb2383a0a94c480dc294dcfc36f5b8a197"
|
||||||
pluginConfig:
|
pluginConfig:
|
||||||
flux:
|
flux:
|
||||||
packages:
|
packages:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ kamaji:
|
|||||||
deploy: false
|
deploy: false
|
||||||
image:
|
image:
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
tag: v0.30.1@sha256:e6be608afa1aba23309d419cba5406a70fc510dcab8cb399fcd2064c1b48f10e
|
tag: v0.30.3@sha256:e04f68e4cc5b023ed39ce2242b32aee51f97235371602239d0c4a9cea97c8d0d
|
||||||
repository: ghcr.io/cozystack/cozystack/kamaji
|
repository: ghcr.io/cozystack/cozystack/kamaji
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
portSecurity: true
|
portSecurity: true
|
||||||
routes: ""
|
routes: ""
|
||||||
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.30.1@sha256:fa14fa7a0ffa628eb079ddcf6ce41d75b43de92e50f489422f8fb15c4dab2dbf
|
image: ghcr.io/cozystack/cozystack/kubeovn-webhook:v0.30.3@sha256:fa14fa7a0ffa628eb079ddcf6ce41d75b43de92e50f489422f8fb15c4dab2dbf
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ global:
|
|||||||
images:
|
images:
|
||||||
kubeovn:
|
kubeovn:
|
||||||
repository: kubeovn
|
repository: kubeovn
|
||||||
tag: v1.13.8@sha256:385329464045cdf5e01364e9f2293edc71065a0910576a8e26ea9ac7097aae71
|
tag: v1.13.8@sha256:f3b6a0228335a9399858247d69ed5dc78510d70149a21161a68f8ed80d35ca89
|
||||||
|
|||||||
@@ -20,12 +20,8 @@ spec:
|
|||||||
additionalScrapeConfigs:
|
additionalScrapeConfigs:
|
||||||
name: additional-scrape-configs
|
name: additional-scrape-configs
|
||||||
key: prometheus-additional.yaml
|
key: prometheus-additional.yaml
|
||||||
resources:
|
resources: {}
|
||||||
limits:
|
configReloaderResources: {}
|
||||||
memory: 1024Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 768Mi
|
|
||||||
#statefulMode: true
|
#statefulMode: true
|
||||||
#statefulStorage:
|
#statefulStorage:
|
||||||
# volumeClaimTemplate:
|
# volumeClaimTemplate:
|
||||||
|
|||||||
Reference in New Issue
Block a user