Archived
feat(ci): gitea woodpecker release support
This commit is contained in:
1 parent
ab4989acaf
commit
5fe8af6642
5 files changed
+76
-57
No files matched your search
@@ -1,57 +0,0 @@
|
||||
name: Build and Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: [ "v*" ]
|
||||
paths-ignore:
|
||||
- "README.md"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Determine Docker tags
|
||||
id: vars
|
||||
run: |
|
||||
# Always tag with commit SHA
|
||||
TAGS="ghcr.io/${{ github.repository_owner }}/opencloud-oidc-webfinger-proxy:${{ github.sha }}"
|
||||
|
||||
# If push to main → add :latest
|
||||
if [[ "${GITHUB_REF_TYPE}" == "branch" && "${GITHUB_REF_NAME}" == "main" ]]; then
|
||||
TAGS="$TAGS,ghcr.io/${{ github.repository_owner }}/opencloud-oidc-webfinger-proxy:latest"
|
||||
fi
|
||||
|
||||
# If push of a version tag → add version tag (e.g. v1.0.0)
|
||||
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
|
||||
VERSION_TAG=${GITHUB_REF_NAME}
|
||||
TAGS="$TAGS,ghcr.io/${{ github.repository_owner }}/opencloud-oidc-webfinger-proxy:${VERSION_TAG}"
|
||||
fi
|
||||
|
||||
echo "TAGS=$TAGS" >> $GITHUB_ENV
|
||||
echo "Docker tags to push:"
|
||||
echo "$TAGS" | tr ',' '\n'
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ env.TAGS }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -0,0 +1,6 @@
|
||||
plugins:
|
||||
- "@semantic-release/commit-analyzer"
|
||||
- "@semantic-release/release-notes-generator"
|
||||
- "@semantic-release/changelog"
|
||||
- ["@semantic-release/git", { assets: ["CHANGELOG.md"], message: "chore(release): ${nextRelease.version} [skip ci]" }]
|
||||
- "@forge-for-gitea/semantic-release-gitea"
|
||||
@@ -0,0 +1,36 @@
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
- event: tag
|
||||
tag: v*
|
||||
|
||||
steps:
|
||||
- name: release
|
||||
image: node:20-alpine
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: gitea_token
|
||||
GITEA_URL: ${CI_FORGE_URL}
|
||||
commands:
|
||||
- npm install -g semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/changelog @semantic-release/git @forge-for-gitea/semantic-release-gitea
|
||||
- npx semantic-release
|
||||
when:
|
||||
event: push
|
||||
branch: main
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: ${CI_FORGE_URL}
|
||||
repo: ${CI_FORGE_URL}/${CI_REPO}
|
||||
tags:
|
||||
- latest
|
||||
- "${CI_COMMIT_TAG##v}"
|
||||
- "${CI_COMMIT_TAG}"
|
||||
username:
|
||||
from_secret: gitea_username
|
||||
password:
|
||||
from_secret: gitea_token
|
||||
when:
|
||||
event: tag
|
||||
tag: v*
|
||||
@@ -0,0 +1,21 @@
|
||||
when:
|
||||
- event: cron
|
||||
cron: "renovate"
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
- name: renovate
|
||||
image: renovate/renovate:43.10
|
||||
environment:
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_ENDPOINT: ${CI_FORGE_URL}
|
||||
RENOVATE_REPOSITORIES: ${CI_REPO}
|
||||
RENOVATE_TOKEN:
|
||||
from_secret: RENOVATE_CI_KEY
|
||||
RENOVATE_ONBOARDING: false
|
||||
RENOVATE_GITHUB_COM_TOKEN:
|
||||
from_secret: RENOVATE_GH_KEY
|
||||
LOG_LEVEL: info
|
||||
|
||||
commands:
|
||||
- renovate ${CI_REPO}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
],
|
||||
"dependencyDashboard": true,
|
||||
"assignees": [
|
||||
"barbirict"
|
||||
],
|
||||
"gitAuthor": "Renovate Bot <renovate-bot@barbiric.io>",
|
||||
"major": {
|
||||
"dependencyDashboardApproval": true
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user