|
|
|
@ -90,20 +90,53 @@ jobs: |
|
|
|
- name: Checkout code |
|
|
|
- name: Checkout code |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
|
|
|
- name: Determine tag |
|
|
|
- name: Get Version |
|
|
|
|
|
|
|
id: info |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Determine Docker Tag |
|
|
|
uses: haya14busa/action-cond@v1 |
|
|
|
uses: haya14busa/action-cond@v1 |
|
|
|
id: imagetag |
|
|
|
id: imagetag |
|
|
|
with: |
|
|
|
with: |
|
|
|
cond: ${{ github.event_name == 'pull_request' }} |
|
|
|
cond: ${{ github.event_name == 'pull_request' }} |
|
|
|
if_true: ${{ github.sha }} |
|
|
|
if_true: ${{ github.sha }} |
|
|
|
if_false: "master" |
|
|
|
if_false: 'master' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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: |
|
|
|
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
|
|
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
|
|
|
|
|
|
|
|
|
|
- name: Build |
|
|
|
- name: Build and Push |
|
|
|
uses: docker/build-push-action@v1 |
|
|
|
uses: docker/build-push-action@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
username: ${{ secrets.DOCKER_USERNAME }} |
|
|
|
context: . |
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }} |
|
|
|
file: Dockerfile |
|
|
|
repository: dexidp/dex |
|
|
|
platforms: linux/amd64,linux/arm/v7,linux/arm64 |
|
|
|
tags: ${{ steps.imagetag.outputs.value }} |
|
|
|
|
|
|
|
add_git_labels: true |
|
|
|
|
|
|
|
push: ${{ github.event_name == 'push' }} |
|
|
|
push: ${{ github.event_name == 'push' }} |
|
|
|
|
|
|
|
tags: dexidp/dex:${{ steps.imagetag.outputs.value }} |
|
|
|
|
|
|
|
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.imagetag.outputs.value }} |
|
|
|
|
|
|
|
org.opencontainers.image.created=${{ steps.info.outputs.created }} |
|
|
|
|
|
|
|
org.opencontainers.image.revision=${{ github.sha }} |
|
|
|
|
|
|
|
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }} |
|
|
|
|