chore: adapt to local mirror and build
This commit is contained in:
parent
bb0cd9d213
commit
cecf1b18d6
7 changed files with 27 additions and 287 deletions
27
.forgejo/workflows/release.yaml
Normal file
27
.forgejo/workflows/release.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
release:
|
||||||
|
types: [ "published" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-image:
|
||||||
|
runs-on: flakes-action
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: https://code.252.no/tommy/kaniko-action@latest
|
||||||
|
with:
|
||||||
|
cache: false
|
||||||
|
context: /workspace/${{ github.repository }}
|
||||||
|
credentials: |
|
||||||
|
code.252.no=${{ github.repository_owner }}:${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
destinations: "code.252.no/tommy/git-sv:latest"
|
||||||
|
push: 'true'
|
70
.github/settings.yml
vendored
70
.github/settings.yml
vendored
|
@ -1,70 +0,0 @@
|
||||||
repository:
|
|
||||||
name: git-sv
|
|
||||||
description: Semantic versioning tool for git based on conventional commits
|
|
||||||
topics: cli, tools, git
|
|
||||||
|
|
||||||
private: false
|
|
||||||
has_issues: true
|
|
||||||
has_wiki: false
|
|
||||||
has_downloads: true
|
|
||||||
|
|
||||||
default_branch: main
|
|
||||||
|
|
||||||
allow_squash_merge: true
|
|
||||||
allow_merge_commit: true
|
|
||||||
allow_rebase_merge: true
|
|
||||||
|
|
||||||
labels:
|
|
||||||
- name: bug
|
|
||||||
color: d73a4a
|
|
||||||
description: Something isn't working
|
|
||||||
- name: documentation
|
|
||||||
color: 0075ca
|
|
||||||
description: Improvements or additions to documentation
|
|
||||||
- name: duplicate
|
|
||||||
color: cfd3d7
|
|
||||||
description: This issue or pull request already exists
|
|
||||||
- name: enhancement
|
|
||||||
color: a2eeef
|
|
||||||
description: New feature or request
|
|
||||||
- name: good first issue
|
|
||||||
color: 7057ff
|
|
||||||
description: Good for newcomers
|
|
||||||
- name: help wanted
|
|
||||||
color: 008672
|
|
||||||
description: Extra attention is needed
|
|
||||||
- name: invalid
|
|
||||||
color: e4e669
|
|
||||||
description: This doesn't seem right
|
|
||||||
- name: question
|
|
||||||
color: d876e3
|
|
||||||
description: Further information is requested
|
|
||||||
- name: wontfix
|
|
||||||
color: ffffff
|
|
||||||
description: This will not be worked on
|
|
||||||
|
|
||||||
branches:
|
|
||||||
- name: main
|
|
||||||
protection:
|
|
||||||
required_pull_request_reviews: null
|
|
||||||
required_status_checks:
|
|
||||||
strict: false
|
|
||||||
contexts:
|
|
||||||
- ci/woodpecker/pr/test
|
|
||||||
- ci/woodpecker/pr/build-package
|
|
||||||
- ci/woodpecker/pr/build-container
|
|
||||||
- ci/woodpecker/pr/docs
|
|
||||||
enforce_admins: false
|
|
||||||
required_linear_history: true
|
|
||||||
restrictions: null
|
|
||||||
- name: docs
|
|
||||||
protection:
|
|
||||||
required_pull_request_reviews: null
|
|
||||||
required_status_checks: null
|
|
||||||
enforce_admins: true
|
|
||||||
required_linear_history: true
|
|
||||||
restrictions:
|
|
||||||
apps: []
|
|
||||||
users: []
|
|
||||||
teams:
|
|
||||||
- bot
|
|
|
@ -1,74 +0,0 @@
|
||||||
---
|
|
||||||
when:
|
|
||||||
- event: [pull_request, tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: security-build
|
|
||||||
image: quay.io/thegeeklab/wp-docker-buildx:5
|
|
||||||
settings:
|
|
||||||
containerfile: Containerfile.multiarch
|
|
||||||
output: type=oci,dest=oci/${CI_REPO_NAME},tar=false
|
|
||||||
repo: ${CI_REPO}
|
|
||||||
|
|
||||||
- name: security-scan
|
|
||||||
image: docker.io/aquasec/trivy
|
|
||||||
depends_on: [security-build]
|
|
||||||
commands:
|
|
||||||
- trivy -v
|
|
||||||
- trivy image --input oci/${CI_REPO_NAME}
|
|
||||||
environment:
|
|
||||||
TRIVY_EXIT_CODE: "1"
|
|
||||||
TRIVY_IGNORE_UNFIXED: "true"
|
|
||||||
TRIVY_NO_PROGRESS: "true"
|
|
||||||
TRIVY_SEVERITY: HIGH,CRITICAL
|
|
||||||
TRIVY_TIMEOUT: 1m
|
|
||||||
TRIVY_DB_REPOSITORY: docker.io/aquasec/trivy-db:2
|
|
||||||
|
|
||||||
- name: publish-dockerhub
|
|
||||||
image: quay.io/thegeeklab/wp-docker-buildx:5
|
|
||||||
depends_on: [security-scan]
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
containerfile: Containerfile.multiarch
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
platforms:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
provenance: false
|
|
||||||
repo: ${CI_REPO}
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
when:
|
|
||||||
- event: [tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
- name: publish-quay
|
|
||||||
image: quay.io/thegeeklab/wp-docker-buildx:5
|
|
||||||
depends_on: [security-scan]
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
containerfile: Containerfile.multiarch
|
|
||||||
password:
|
|
||||||
from_secret: quay_password
|
|
||||||
platforms:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
provenance: false
|
|
||||||
registry: quay.io
|
|
||||||
repo: quay.io/${CI_REPO}
|
|
||||||
username:
|
|
||||||
from_secret: quay_username
|
|
||||||
when:
|
|
||||||
- event: [tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- test
|
|
|
@ -1,41 +0,0 @@
|
||||||
---
|
|
||||||
when:
|
|
||||||
- event: [pull_request, tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: docker.io/techknowlogick/xgo:go-1.23.3
|
|
||||||
commands:
|
|
||||||
- ln -s $(pwd) /source
|
|
||||||
- make release
|
|
||||||
|
|
||||||
- name: executable
|
|
||||||
image: quay.io/thegeeklab/alpine-tools
|
|
||||||
commands:
|
|
||||||
- $(find dist/ -executable -type f -iname ${CI_REPO_NAME}-linux-amd64) --help
|
|
||||||
|
|
||||||
- name: changelog
|
|
||||||
image: quay.io/thegeeklab/git-sv
|
|
||||||
commands:
|
|
||||||
- git sv current-version
|
|
||||||
- git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
|
|
||||||
- cat CHANGELOG.md
|
|
||||||
|
|
||||||
- name: publish-github
|
|
||||||
image: docker.io/plugins/github-release
|
|
||||||
settings:
|
|
||||||
api_key:
|
|
||||||
from_secret: github_token
|
|
||||||
files:
|
|
||||||
- dist/*
|
|
||||||
note: CHANGELOG.md
|
|
||||||
overwrite: true
|
|
||||||
title: ${CI_COMMIT_TAG}
|
|
||||||
when:
|
|
||||||
- event: [tag]
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- test
|
|
|
@ -1,59 +0,0 @@
|
||||||
---
|
|
||||||
when:
|
|
||||||
- event: [pull_request, tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: markdownlint
|
|
||||||
image: quay.io/thegeeklab/markdownlint-cli
|
|
||||||
commands:
|
|
||||||
- markdownlint 'README.md' 'CONTRIBUTING.md'
|
|
||||||
|
|
||||||
- name: spellcheck
|
|
||||||
image: quay.io/thegeeklab/alpine-tools
|
|
||||||
commands:
|
|
||||||
- spellchecker --files 'docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls
|
|
||||||
environment:
|
|
||||||
FORCE_COLOR: "true"
|
|
||||||
|
|
||||||
- name: link-validation
|
|
||||||
image: docker.io/lycheeverse/lychee
|
|
||||||
commands:
|
|
||||||
- lychee --no-progress --format detailed README.md
|
|
||||||
|
|
||||||
- name: pushrm-dockerhub
|
|
||||||
image: docker.io/chko/docker-pushrm:1
|
|
||||||
depends_on: [markdownlint, spellcheck, link-validation]
|
|
||||||
environment:
|
|
||||||
DOCKER_PASS:
|
|
||||||
from_secret: docker_password
|
|
||||||
DOCKER_USER:
|
|
||||||
from_secret: docker_username
|
|
||||||
PUSHRM_FILE: README.md
|
|
||||||
PUSHRM_SHORT: Semantic versioning tool for git based on conventional commits
|
|
||||||
PUSHRM_TARGET: ${CI_REPO}
|
|
||||||
when:
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
status: [success]
|
|
||||||
|
|
||||||
- name: pushrm-quay
|
|
||||||
image: docker.io/chko/docker-pushrm:1
|
|
||||||
depends_on: [markdownlint, spellcheck, link-validation]
|
|
||||||
environment:
|
|
||||||
APIKEY__QUAY_IO:
|
|
||||||
from_secret: quay_token
|
|
||||||
PUSHRM_FILE: README.md
|
|
||||||
PUSHRM_TARGET: quay.io/${CI_REPO}
|
|
||||||
when:
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
status: [success]
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- build-package
|
|
||||||
- build-container
|
|
|
@ -1,26 +0,0 @@
|
||||||
---
|
|
||||||
when:
|
|
||||||
- event: [tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
runs_on: [success, failure]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: matrix
|
|
||||||
image: quay.io/thegeeklab/wp-matrix
|
|
||||||
settings:
|
|
||||||
homeserver:
|
|
||||||
from_secret: matrix_homeserver
|
|
||||||
room_id:
|
|
||||||
from_secret: matrix_room_id
|
|
||||||
user_id:
|
|
||||||
from_secret: matrix_user_id
|
|
||||||
access_token:
|
|
||||||
from_secret: matrix_access_token
|
|
||||||
when:
|
|
||||||
- status: [success, failure]
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- docs
|
|
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
when:
|
|
||||||
- event: [pull_request, tag]
|
|
||||||
- event: [push, manual]
|
|
||||||
branch:
|
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: lint
|
|
||||||
image: docker.io/library/golang:1.23.3
|
|
||||||
commands:
|
|
||||||
- make lint
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
image: docker.io/library/golang:1.23.3
|
|
||||||
commands:
|
|
||||||
- make test
|
|
Loading…
Add table
Reference in a new issue