5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 14:21:41 +00:00
panel/.woodpecker.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

2022-04-13 15:31:36 +00:00
pipeline:
publish:
2023-03-14 22:15:26 +00:00
image: "plugins/docker"
2022-04-13 15:31:36 +00:00
settings:
2023-03-14 22:15:26 +00:00
registry: "registry.nulo.in"
username: "sutty"
repo: "registry.nulo.in/sutty/panel"
2022-04-13 15:31:36 +00:00
tags:
2023-03-14 22:15:26 +00:00
- "${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
- "latest"
2022-04-13 15:31:36 +00:00
build_args:
2023-03-14 22:15:26 +00:00
- "RUBY_VERSION=${RUBY_VERSION}"
- "RUBY_PATCH=${RUBY_PATCH}"
- "ALPINE_VERSION=${ALPINE_VERSION}"
- "BASE_IMAGE=registry.nulo.in/sutty/rails"
2022-04-13 15:31:36 +00:00
purge: false
secrets:
2023-03-14 22:15:26 +00:00
- "docker_password"
2022-04-13 15:31:36 +00:00
when:
2022-04-13 15:37:13 +00:00
branch:
2023-03-14 22:15:26 +00:00
- "rails"
- "panel.sutty.nl"
event: "push"
path:
include:
- "Dockerfile"
- ".dockerignore"
2023-03-14 23:26:07 +00:00
assets:
image: "registry.nulo.in/sutty/panel:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
commands:
- "apk add python2 dotenv openssh-client"
- "mkdir ~/.ssh/"
- "echo \"$${KNOW_HOSTS}\" | base64 -d >> ~/.ssh/known_hosts"
- "eval $(ssh-agent -s)"
- "echo \"$${SSH_KEY}\" | base64 -d | ssh-add -"
- "git config user.name Woodpecker"
- "git config user.email ci@sutty.coop.ar"
2023-03-15 14:23:35 +00:00
- "git remote add upstream $${ORIGIN}"
2023-03-14 23:26:07 +00:00
- "git checkout -B ${CI_COMMIT_BRANCH}"
- "yarn"
- "cp .env.example .env"
- "dotenv bundle install --path=vendor"
- "dotenv RAILS_ENV=production bundle exec rails assets:precompile assets:clean"
- "git add public && git commit -m \"ci: assets [skip ci]\""
2023-03-15 14:23:35 +00:00
- "git push upstream ${CI_COMMIT_BRANCH}"
2023-03-14 23:26:07 +00:00
secrets:
- "SSH_KEY"
- "KNOWN_HOSTS"
- "ORIGIN"
when:
branch:
- "rails"
- "panel.sutty.nl"
path:
include:
- "app/assets/**/*"
- "app/javascript/**/*"
- "package.json"
- "yarn.lock"
2022-04-13 15:31:36 +00:00
matrix:
include:
2023-03-14 22:15:26 +00:00
- ALPINE_VERSION: "3.14.8"
RUBY_VERSION: "2.7"
RUBY_PATCH: "6"