From bda71db95d85b8fc331b191e4fab3b23702620c7 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 2 Jun 2024 16:41:03 +0200 Subject: [PATCH] feat: improve CI config --- .woodpecker.yml | 57 ------------------------------------ .woodpecker/.release-dev.yml | 20 +++++++++++++ .woodpecker/.release.yml | 20 +++++++++++++ .woodpecker/.test.yml | 8 +++++ 4 files changed, 48 insertions(+), 57 deletions(-) delete mode 100644 .woodpecker.yml create mode 100644 .woodpecker/.release-dev.yml create mode 100644 .woodpecker/.release.yml create mode 100644 .woodpecker/.test.yml diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 773ad03..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,57 +0,0 @@ -steps: - test: - image: node - commands: - - yarn --pure-lockfile - - yarn run test - - build-latest-container: - when: - branch: main - event: tag - image: plugins/docker - settings: - registry: https://codeberg.org/v2 - username: - from_secret: codeberg_username - password: - from_secret: codeberg_password - repo: codeberg.org/keyoxide/keyoxide-web - tags: latest - build_args_from_env: - - CI_COMMIT_SHA - - CI_COMMIT_BRANCH - - build-tag-container: - when: - branch: main - event: tag - image: plugins/docker - settings: - registry: https://codeberg.org/v2 - username: - from_secret: codeberg_username - password: - from_secret: codeberg_password - repo: codeberg.org/keyoxide/keyoxide-web - auto_tag: true - build_args_from_env: - - CI_COMMIT_SHA - - CI_COMMIT_BRANCH - - build-dev-container: - when: - branch: dev - event: push - image: plugins/docker - settings: - registry: https://codeberg.org/v2 - username: - from_secret: codeberg_username - password: - from_secret: codeberg_password - repo: codeberg.org/keyoxide/keyoxide-web - tags: dev - build_args_from_env: - - CI_COMMIT_SHA - - CI_COMMIT_BRANCH \ No newline at end of file diff --git a/.woodpecker/.release-dev.yml b/.woodpecker/.release-dev.yml new file mode 100644 index 0000000..1a823a5 --- /dev/null +++ b/.woodpecker/.release-dev.yml @@ -0,0 +1,20 @@ +when: + branch: dev + event: push +steps: + build-latest-container: + image: woodpeckerci/plugin-docker-buildx + settings: + registry: https://codeberg.org/v2 + username: + from_secret: codeberg_username + password: + from_secret: codeberg_password + repo: codeberg.org/keyoxide/keyoxide-web + tag: dev + build_args_from_env: + - CI_COMMIT_SHA + - CI_COMMIT_BRANCH + +depends_on: + - test \ No newline at end of file diff --git a/.woodpecker/.release.yml b/.woodpecker/.release.yml new file mode 100644 index 0000000..5ccf827 --- /dev/null +++ b/.woodpecker/.release.yml @@ -0,0 +1,20 @@ +when: + branch: main + event: tag +steps: + build-latest-container: + image: woodpeckerci/plugin-docker-buildx + settings: + registry: https://codeberg.org/v2 + username: + from_secret: codeberg_username + password: + from_secret: codeberg_password + repo: codeberg.org/keyoxide/keyoxide-web + auto_tag: true + build_args_from_env: + - CI_COMMIT_SHA + - CI_COMMIT_BRANCH + +depends_on: + - test \ No newline at end of file diff --git a/.woodpecker/.test.yml b/.woodpecker/.test.yml new file mode 100644 index 0000000..9715e1c --- /dev/null +++ b/.woodpecker/.test.yml @@ -0,0 +1,8 @@ +when: + event: [push, pull_request, tag, release, manual] +steps: + test: + image: node:20 + commands: + - npm ci + - npm test \ No newline at end of file