forked from dciangot/dodas-IAMClientRec
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (54 loc) · 1.65 KB
/
publish.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: publish
on:
push:
tags:
- "*"
jobs:
publish:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build .
timeout-minutes: 6
- name: Upload release binaries
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["./dodas-IAMClient*"]'
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Repo Owner
id: get_repo_owner
run: echo ::set-output name=repo_owner::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
- name: Build container image
uses: docker/build-push-action@v2
with:
context: ./
outputs: "type=registry,push=true"
tags: |
ghcr.io/${{ steps.get_repo_owner.outputs.repo_owner }}/dodas-iam-client-rec:${{ env.RELEASE_VERSION }}
file: ./Dockerfile
platforms: linux/amd64