forked from mystiq/dex
Add docker build and push to docker hub
This commit is contained in:
parent
eef8c0a60d
commit
0b067af8e7
2 changed files with 50 additions and 0 deletions
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
@ -81,3 +81,29 @@ jobs:
|
|||
# Ensure proto generation doesn't depend on external packages.
|
||||
- name: Verify proto
|
||||
run: make verify-proto
|
||||
|
||||
docker:
|
||||
name: Docker
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Determine tag
|
||||
uses: haya14busa/action-cond@v1
|
||||
id: imagetag
|
||||
with:
|
||||
cond: ${{ github.event_name == 'pull_request' }}
|
||||
if_true: ${{ github.sha }}
|
||||
if_false: "master"
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: dexidp/dex
|
||||
tags: ${{ steps.imagetag.outputs.value }}
|
||||
add_git_labels: true
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
|
|
24
.github/workflows/release.yml
vendored
Normal file
24
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: Docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: dexidp/dex
|
||||
tags: latest
|
||||
tag_with_ref: true
|
||||
add_git_labels: true
|
Loading…
Reference in a new issue