36 lines
912 B
YAML
36 lines
912 B
YAML
matrix:
|
|
platform:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
|
|
labels:
|
|
platform: ${platform}
|
|
|
|
when:
|
|
branch: main
|
|
event: [push, pull_request, tag]
|
|
|
|
steps:
|
|
test-build:
|
|
image: docker:27-dind
|
|
commands:
|
|
- docker build -t source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
when:
|
|
event: pull_request
|
|
|
|
build-to-registry:
|
|
image: docker:27-dind
|
|
environment:
|
|
CI_USER_PASSWORD:
|
|
from_secret: registry_token
|
|
commands:
|
|
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
|
|
- docker build -t source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
|
|
- docker push source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform##linux/}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
when:
|
|
event: [push, tag]
|