Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Janik-Haag authored Oct 23, 2023
2 parents 590bcf0 + e1b08c2 commit 00125ef
Show file tree
Hide file tree
Showing 12 changed files with 746 additions and 634 deletions.
65 changes: 52 additions & 13 deletions .woodpecker/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,30 @@ variables:
- publish_logins: &publish_logins
# Default DockerHub login
- registry: https://index.docker.io/v1/
username:
from_secret: docker_username
username: woodpeckerbot
password:
from_secret: docker_password
# Additional Quay.IO login
- registry: https://quay.io
username:
from_secret: QUAY_IO_USER
username: 'woodpeckerci+wp_ci'
password:
from_secret: QUAY_IO_TOKEN
- &publish_repos_server 'woodpeckerci/woodpecker-server,quay.io/woodpeckerci/woodpecker-server'
- &publish_repos_agent 'woodpeckerci/woodpecker-agent,quay.io/woodpeckerci/woodpecker-agent'
- &publish_repos_cli 'woodpeckerci/woodpecker-cli,quay.io/woodpeckerci/woodpecker-cli'
- path: &when_path
# web source code
- "web/**"
# api source code
- "server/api/**"
# go source code
- "**/*.go"
- "go.*"
# schema changes
- "pipeline/schema/**"
# Dockerfile changes
- "docker/**"


steps:
vendor:
Expand Down Expand Up @@ -68,11 +79,14 @@ steps:
TAGS: bindata sqlite sqlite_unlock_notify netgo
XGO_VERSION: *xgo_version
when:
event: pull_request
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path

publish-server-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
Expand All @@ -81,10 +95,11 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-server-alpine-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
Expand All @@ -93,10 +108,11 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-server-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
group: docker
settings:
dry_run: true
Expand All @@ -106,10 +122,12 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-server-alpine-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
group: docker
settings:
dry_run: true
Expand All @@ -119,6 +137,8 @@ steps:
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

cross-compile-server:
image: *xgo_image
Expand All @@ -136,6 +156,7 @@ steps:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
event: [push, tag]
path: *when_path

publish-next-server:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -149,6 +170,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -162,6 +184,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-server:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -175,6 +198,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.1.0
Expand All @@ -188,6 +212,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-server:
group: docker
Expand Down Expand Up @@ -222,7 +247,7 @@ steps:
publish-agent-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
settings:
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
Expand All @@ -231,11 +256,12 @@ steps:
build_args: *build_args
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-agent-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-agent
Expand All @@ -245,6 +271,8 @@ steps:
build_args: *build_args
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-next-agent:
group: docker
Expand All @@ -259,6 +287,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-agent-alpine:
group: docker
Expand All @@ -273,6 +302,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-agent:
group: docker
Expand All @@ -287,6 +317,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-agent-alpine:
group: docker
Expand All @@ -301,6 +332,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-agent:
group: docker
Expand Down Expand Up @@ -337,7 +369,7 @@ steps:
publish-cli-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
settings:
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
Expand All @@ -346,11 +378,12 @@ steps:
build_args: *build_args
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request

publish-cli-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [ docker_password ]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-cli
Expand All @@ -360,6 +393,8 @@ steps:
build_args: *build_args
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
path: *when_path

publish-next-cli:
group: docker
Expand All @@ -374,6 +409,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-next-cli-alpine:
group: docker
Expand All @@ -388,6 +424,7 @@ steps:
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path

publish-release-branch-cli:
group: docker
Expand All @@ -402,6 +439,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

publish-release-branch-cli-alpine:
group: docker
Expand All @@ -416,6 +454,7 @@ steps:
when:
branch: release/*
event: push
path: *when_path

release-cli:
group: docker
Expand Down
15 changes: 7 additions & 8 deletions cmd/server/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,12 @@ func setupSignatureKeys(_store store.Store) (crypto.PrivateKey, crypto.PublicKey
} else if err != nil {
log.Fatal().Err(err).Msgf("Failed to load private key")
return nil, nil
} else {
privKeyStr, err := hex.DecodeString(privKey)
if err != nil {
log.Fatal().Err(err).Msgf("Failed to decode private key")
return nil, nil
}
privKey := ed25519.PrivateKey(privKeyStr)
return privKey, privKey.Public()
}
privKeyStr, err := hex.DecodeString(privKey)
if err != nil {
log.Fatal().Err(err).Msgf("Failed to decode private key")
return nil, nil
}
privateKey := ed25519.PrivateKey(privKeyStr)
return privateKey, privateKey.Public()
}
4 changes: 1 addition & 3 deletions docs/docs/30-administration/11-forges/10-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
| Event: Pull-Request | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Event: Deploy | :white_check_mark: | :x: | :x: | :x: |
| [Multiple workflows](../../20-usage/25-workflows.md) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [when.path filter](../../20-usage/20-workflow-syntax.md#path) | :white_check_mark: | :white_check_mark:¹ | :white_check_mark: | :x: |

¹ for pull requests at least Gitea version 1.17 is required
| [when.path filter](../../20-usage/20-workflow-syntax.md#path) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
5 changes: 5 additions & 0 deletions docs/plugins/woodpecker-plugins/plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"docs": "https://codeberg.org/woodpecker-plugins/node-pm/raw/branch/main/docs.md",
"verified": true
},
{
"name": "Prettier",
"docs": "https://raw.githubusercontent.com/woodpecker-ci/plugin-prettier/main/docs.md",
"verified": true
},
{
"name": "Block Git changes",
"docs": "https://codeberg.org/qwerty287/woodpecker-block-git-changes/raw/branch/main/docs.md",
Expand Down
Loading

0 comments on commit 00125ef

Please sign in to comment.