---
resource_types:
- name: oci-image
type: registry-image
source:
repository: redxef/concourse-oci-resource
tag: latest
resources:
- name: source
type: git
uri: https://gitea.redxef.at/redxef/concourse-oci-resource
branch: master
fetch_tags: true
- name: upstream-image
repository: alpine
- name: concourse-oci-resource
type: oci-image
tag: edge
username: ((docker.username))
password: ((docker.password))
jobs:
- name: build-push-edge
plan:
- get: source
trigger: true
- get: upstream-image
- task: compute-docker-tags
config:
platform: linux
image_resource:
repository: alpine/git
inputs:
path: .
outputs:
- name: docker-tags
run:
path: sh
args:
- -c
- |
#!/usr/bin/env sh
git rev-parse --short HEAD > docker-tags/tags.txt
git show-ref --tags | \
sed -n "/$(git rev-parse HEAD)/ s|$(git rev-parse HEAD).refs/tags/||gp" \
>> docker-tags/tags.txt
- task: build
privileged: true
repository: redxef/concourse-buildkit
- name: build-output
params:
dest: build-output/image.tar
platform: aarch64,arm,ppc64le,s390x,x86_64
context: .
path: build
- put: concourse-oci-resource
- build-output
- docker-tags
image: build-output/image.tar
additional_tags: docker-tags/tags.txt