Archived
Merge pull request 'feat(ci): migrate to woodpecker for ci, gitea for releases' (#6) from dev into main
ci/woodpecker/push/docker-release Pipeline was successful
ci/woodpecker/push/docker-release Pipeline was successful
Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
commit
a5fa747708
5 files changed
+81
-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,41 @@
|
|||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
- event: tag
|
||||||
|
ref: "refs/tags/v*"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: release
|
||||||
|
image: node:20-alpine
|
||||||
|
environment:
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_token
|
||||||
|
GITEA_USERNAME:
|
||||||
|
from_secret: gitea_username
|
||||||
|
GITEA_URL: ${CI_FORGE_URL}
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git
|
||||||
|
- git config --global credential.helper store
|
||||||
|
- echo "https://$${GITEA_USERNAME}:$${GITEA_TOKEN}@git.barbiric.io" > ~/.git-credentials
|
||||||
|
- 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/kaniko
|
||||||
|
settings:
|
||||||
|
registry: git.barbiric.io
|
||||||
|
repo: git.barbiric.io/${CI_REPO}
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- "${CI_COMMIT_TAG##v}"
|
||||||
|
- "${CI_COMMIT_TAG}"
|
||||||
|
username:
|
||||||
|
from_secret: gitea_username
|
||||||
|
password:
|
||||||
|
from_secret: gitea_token
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
ref: "refs/tags/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