-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1021 Bytes
/
build.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
name: Build
on:
push:
branches:
- main
jobs:
build:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Checkout Repo
uses: actions/checkout@v2
# workaround as there is no way to get the Release name or just the tag name by itself
- name: Extract branch name
shell: bash
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
id: extract_tag
- name: Build Lab Image
env:
VERSION: ${{ github.sha }}
run: |
make build version=$VERSION
- name: Prune dangling images
run: docker image prune -f
- name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish version to GitHub Package Registry
env:
VERSION: ${{ github.sha }}
run: |
make release version=$VERSION