feat: switch out github actions for woodpecker
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
a715a21a8a
commit
7bfe0ded4c
5 changed files with 49 additions and 107 deletions
104
.github/workflows/release.yml
vendored
104
.github/workflows/release.yml
vendored
|
@ -1,104 +0,0 @@
|
||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, next, dev]
|
|
||||||
pull_request:
|
|
||||||
branches: [main, next, dev]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Cache Node.js dependencies
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build TypeScript source code
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Semantic Release
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
run: npx semantic-release
|
|
||||||
|
|
||||||
- name: Store build artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build-artifacts
|
|
||||||
path: . # Include all files in the artifact
|
|
||||||
path-ignore: node_modules
|
|
||||||
|
|
||||||
docker:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Download build artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build-artifacts
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
zyner/xyter
|
|
||||||
tags: |
|
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Container registry
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
platforms: linux/amd64
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"repositoryUrl": "git@git.zyner.org:meta/xyter.git",
|
||||||
"branches": [
|
"branches": [
|
||||||
"main",
|
"main",
|
||||||
{
|
{
|
||||||
|
@ -22,7 +23,6 @@
|
||||||
{
|
{
|
||||||
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
|
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"@semantic-release/github"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
42
.woodpecker.yaml
Normal file
42
.woodpecker.yaml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
when:
|
||||||
|
- event: [ push, pull_request, tag ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: tags
|
||||||
|
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
||||||
|
settings:
|
||||||
|
tags: |
|
||||||
|
edge -v latest
|
||||||
|
edge -b main -v main
|
||||||
|
edge -b dev -v dev
|
||||||
|
edge -b next -v next
|
||||||
|
cron
|
||||||
|
pr
|
||||||
|
semver --format {{major}}
|
||||||
|
semver --format {{major}}.{{minor}}
|
||||||
|
semver --format {{version}}
|
||||||
|
sha
|
||||||
|
- name: build
|
||||||
|
image: quay.io/woodpeckerci/plugin-kaniko
|
||||||
|
settings:
|
||||||
|
registry: reg.zyner.org
|
||||||
|
repo: library/xyter
|
||||||
|
username:
|
||||||
|
from_secret: registry-username
|
||||||
|
password:
|
||||||
|
from_secret: registry-password
|
||||||
|
- name: semantic-release
|
||||||
|
image: node:20
|
||||||
|
commands:
|
||||||
|
- echo "$DEPLOY_KEY" > /tmp/git_deploy_key
|
||||||
|
- echo >> /tmp/git_deploy_key
|
||||||
|
- chmod 600 /tmp/git_deploy_key
|
||||||
|
- mkdir -p $HOME/.ssh
|
||||||
|
- ssh-keyscan git.zyner.org > $HOME/.ssh/known_hosts
|
||||||
|
- eval "$(ssh-agent -s)"
|
||||||
|
- ssh-add /tmp/git_deploy_key
|
||||||
|
- npm install
|
||||||
|
- npx semantic-release
|
||||||
|
environment:
|
||||||
|
DEPLOY_KEY:
|
||||||
|
from_secret: deploy-key
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1927,6 +1927,7 @@
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
|
@ -1958,6 +1959,7 @@
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"balanced-match": "^1.0.0"
|
"balanced-match": "^1.0.0"
|
||||||
|
@ -2073,6 +2075,7 @@
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": "^4.1.0",
|
"ansi-styles": "^4.1.0",
|
||||||
|
@ -5837,6 +5840,7 @@
|
||||||
"version": "9.0.5",
|
"version": "9.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
|
||||||
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zynerorg/xyter.git"
|
"url": "git+https://git.zyner.org/meta/xyter.git"
|
||||||
},
|
},
|
||||||
"author": "Vermium Sifell <vermium@zyner.org> (https://zyner.org)",
|
"author": "Vermium Sifell <vermium@zyner.org> (https://zyner.org)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|
Loading…
Add table
Reference in a new issue