forked from plexsystems/konstraint
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 928 Bytes
/
push_container.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
name: Push Tagged Container
on:
push:
tags:
- v*.*.*
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- name: setup go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: checkout
uses: actions/checkout@v4
- name: unit test
run: make test
- name: test build
run: make build
container-image:
runs-on: ubuntu-latest
needs: [unit-test]
steps:
- name: checkout
uses: actions/checkout@v4
- name: get version tag
run: echo TAG_NAME=$(echo ${GITHUB_REF} | rev | cut -d"/" -f1 | rev) >> $GITHUB_ENV
- name: docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: docker build
run: >-
docker buildx create --name builder &&
docker buildx use --builder builder &&
make dockerx-build version=${TAG_NAME}