73 lines
1.9 KiB
YAML
73 lines
1.9 KiB
YAML
when:
|
|
- event: push
|
|
branch: stable
|
|
path: [ "*.ex", "*.eex", "*.exs", "mix.lock", ".woodpecker/**" ]
|
|
- event: tag
|
|
branch: stable
|
|
|
|
matrix:
|
|
platform:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
|
|
# This is needed for the when clauses below.
|
|
# When the platform clause is fixed, this might not be needed anymore
|
|
labels:
|
|
platform: ${platform}
|
|
|
|
variables:
|
|
docker_variables: &docker_variables
|
|
repo: pleroma-test/pleroma
|
|
registry: git.fluffytail.org
|
|
username:
|
|
from_secret: pleroma-ci-user
|
|
password:
|
|
from_secret: pleroma-ci-password
|
|
kaniko_image: &kaniko_image woodpeckerci/plugin-kaniko:2.3.1
|
|
|
|
steps:
|
|
docker-stable-amd64:
|
|
image: *kaniko_image
|
|
# when:
|
|
# - platform: linux/amd64
|
|
# does not work even though it should according to docs
|
|
# https://github.com/woodpecker-ci/woodpecker/discussions/5367#discussioncomment-13901342
|
|
when:
|
|
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "push"'
|
|
settings:
|
|
<<: *docker_variables
|
|
tags: &amd64_tags
|
|
- latest-amd64
|
|
- stable-amd64
|
|
- ${CI_COMMIT_SHA}-amd64
|
|
|
|
docker-stable-tag-amd64:
|
|
image: *kaniko_image
|
|
when:
|
|
- evaluate: 'platform == "linux/amd64" && CI_PIPELINE_EVENT == "tag"'
|
|
settings:
|
|
<<: *docker_variables
|
|
tags:
|
|
- <<: *amd64_tags
|
|
- ${CI_COMMIT_TAG}-amd64
|
|
|
|
docker-stable-arm64:
|
|
image: *kaniko_image
|
|
when:
|
|
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "push"'
|
|
settings:
|
|
<<: *docker_variables
|
|
tags: &arm64_tags
|
|
- latest-arm64
|
|
- stable-arm64
|
|
- ${CI_COMMIT_SHA}-arm64
|
|
|
|
docker-stable-tag-arm64:
|
|
image: *kaniko_image
|
|
when:
|
|
- evaluate: 'platform == "linux/arm64" && CI_PIPELINE_EVENT == "tag"'
|
|
settings:
|
|
<<: *docker_variables
|
|
tags:
|
|
- <<: *arm64_tags
|
|
- ${CI_COMMIT_TAG}-arm64
|