From 7db00e52d151e022b7933f6e0016d55e768aae2b Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 17 May 2024 09:20:35 +0200 Subject: [PATCH] add variables in pipelines --- .woodpecker/test-image.yml | 59 ++++++++++++++------------------------ 1 file changed, 21 insertions(+), 38 deletions(-) diff --git a/.woodpecker/test-image.yml b/.woodpecker/test-image.yml index 9c94cb7..9c9e3e7 100644 --- a/.woodpecker/test-image.yml +++ b/.woodpecker/test-image.yml @@ -4,15 +4,10 @@ when: branch: - ${CI_REPO_DEFAULT_BRANCH} -depends_on: - - "ci" -steps: - default: - image: gitea.ocram85.com/plugins/gitea-package:next - pull: true - secrets: [ gitea_user, gitea_passwd] - settings: +variables: + - &build_plugin 'gitea.ocram85.com/plugins/gitea-package:next' + - &default_settings user: from_secret: gitea_user password: @@ -22,25 +17,29 @@ steps: package_version: "0.1.0" file_source: "./README.md" file_name: "readme.md" + #update: "true" + +depends_on: + - "ci" + +steps: + default: + image: *build_plugin + pull: true + secrets: [ gitea_user, gitea_passwd] + settings: + <<: *default_settings update: "true" when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} debug-out: - image: gitea.ocram85.com/plugins/gitea-package:next + image: *build_plugin pull: true secrets: [ gitea_user, gitea_passwd] settings: - user: - from_secret: gitea_user - password: - from_secret: gitea_passwd - owner: "plugins" - package_name: "dummy_package" - package_version: "0.1.0" - file_source: "./README.md" - file_name: "readme.md" + <<: *default_settings update: "true" debug: "true" when: @@ -48,40 +47,24 @@ steps: branch: ${CI_REPO_DEFAULT_BRANCH} no-update: - image: gitea.ocram85.com/plugins/gitea-package:next + image: *build_plugin pull: true failure: ignore secrets: [ gitea_user, gitea_passwd] settings: - user: - from_secret: gitea_user - password: - from_secret: gitea_passwd - owner: "plugins" - package_name: "dummy_package" - package_version: "0.1.0" - file_source: "./README.md" - file_name: "readme.md" + <<: *default_settings debug: "true" when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH} no-update-debug: - image: gitea.ocram85.com/plugins/gitea-package:next + image: *build_plugin pull: true failure: ignore secrets: [ gitea_user, gitea_passwd] settings: - user: - from_secret: gitea_user - password: - from_secret: gitea_passwd - owner: "plugins" - package_name: "dummy_package" - package_version: "0.1.0" - file_source: "./README.md" - file_name: "readme.md" + <<: *default_settings when: event: pull_request branch: ${CI_REPO_DEFAULT_BRANCH}