forked from mintel/dex-k8s-authenticator
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (30 loc) · 1005 Bytes
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Release
on:
push:
tags:
- 'v*'
jobs:
publish-image:
name: Publish Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup asdf
uses: asdf-vm/actions/setup@v1
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Granting private modules access
run: |
git config --global url."https://${{ secrets.CI_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build container image
run: TAG=${{ env.RELEASE_VERSION }} make container
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- name: Push container image
run: TAG=${{ env.RELEASE_VERSION }} make push-image