2020-07-01 16:33:41 +05:30
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2020-09-28 03:17:39 +05:30
|
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
2020-07-01 16:33:41 +05:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
name: Docker
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-09-28 03:17:39 +05:30
|
|
|
- name: Get Version
|
|
|
|
id: info
|
|
|
|
run: |
|
|
|
|
VERSION=$(shell ./scripts/git-version)
|
|
|
|
echo ::set-output name=version::${VERSION}
|
|
|
|
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
with:
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
version: latest
|
|
|
|
# TODO: Remove driver-opts once fix is released docker/buildx#386
|
|
|
|
driver-opts: image=moby/buildkit:master
|
|
|
|
|
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
2020-09-28 03:26:02 +05:30
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2020-09-28 03:17:39 +05:30
|
|
|
|
|
|
|
- name: Build and Push
|
|
|
|
uses: docker/build-push-action@v2
|
2020-07-01 16:33:41 +05:30
|
|
|
with:
|
2020-09-28 03:17:39 +05:30
|
|
|
context: .
|
|
|
|
file: Dockerfile
|
|
|
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
dexidp/dex:latest
|
|
|
|
dexidp/dex:${{ steps.info.outputs.version }}
|
|
|
|
labels: |
|
|
|
|
org.opencontainers.image.title=${{ github.event.repository.name }}
|
|
|
|
org.opencontainers.image.description=${{ github.event.repository.description }}
|
|
|
|
org.opencontainers.image.url=${{ github.event.repository.html_url }}
|
|
|
|
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
|
|
|
|
org.opencontainers.image.version=${{ steps.info.outputs.version }}
|
|
|
|
org.opencontainers.image.created=${{ steps.info.outputs.created }}
|
|
|
|
org.opencontainers.image.revision=${{ github.sha }}
|
|
|
|
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
|