pipeline: publish: image: "plugins/docker" settings: registry: "registry.nulo.in" username: "sutty" repo: "registry.nulo.in/sutty/panel" tags: - "${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}" - "latest" build_args: - "RUBY_VERSION=${RUBY_VERSION}" - "RUBY_PATCH=${RUBY_PATCH}" - "ALPINE_VERSION=${ALPINE_VERSION}" - "BASE_IMAGE=registry.nulo.in/sutty/rails" purge: false secrets: - "docker_password" when: branch: - "rails" - "panel.sutty.nl" event: "push" path: include: - "Dockerfile" - ".dockerignore" 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" - "git remote add upstream $${ORIGIN}" - "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]\"" - "git push upstream ${CI_COMMIT_BRANCH}" secrets: - "SSH_KEY" - "KNOWN_HOSTS" - "ORIGIN" when: branch: - "rails" - "panel.sutty.nl" path: include: - "app/assets/**/*" - "app/javascript/**/*" - "package.json" - "yarn.lock" matrix: include: - ALPINE_VERSION: "3.14.8" RUBY_VERSION: "2.7" RUBY_PATCH: "6"