diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d3f3286 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,93 @@ +kind: pipeline +name: amd64 + +platform: + os: linux + arch: amd64 + +steps: + - name: build + image: plugins/docker + settings: + auto_tag: true + auto_tag_suffix: amd64 + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request + +--- +kind: pipeline +name: arm + +platform: + os: linux + arch: arm + +steps: + - name: build + image: plugins/docker:linux-arm + settings: + auto_tag: true + auto_tag_suffix: arm + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request + +--- +kind: pipeline +name: arm64 + +platform: + os: linux + arch: arm64 + +steps: + - name: build + image: plugins/docker:linux-arm64 + settings: + auto_tag: true + auto_tag_suffix: arm64 + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request +--- +kind: pipeline +name: manifest + +steps: + - name: manifest + image: plugins/manifest:1 + settings: + spec: manifest.tmpl + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password + platforms: + - linux/amd64 + - linux/arm + - linux/arm64 + +depends_on: + - amd64 + - arm + - arm64 diff --git a/manifest.tmpl b/manifest.tmpl new file mode 100644 index 0000000..e655f39 --- /dev/null +++ b/manifest.tmpl @@ -0,0 +1,18 @@ +image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}amd64 + platform: + architecture: amd64 + os: linux + - + image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}arm + platform: + architecture: arm + os: linux