-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (48 loc) · 1.48 KB
/
ubuntu-2004-builder.yml
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
name: ubuntu-2004-builder container
on:
workflow_dispatch:
push:
branches:
- main
- "release/*"
paths:
- "docker/ubuntu-2004-builder.Dockerfile"
- ".github/workflows/ubuntu-2004-builder.yml"
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
paths:
- "docker/ubuntu-2004-builder.Dockerfile"
- ".github/workflows/ubuntu-2004-builder.yml"
jobs:
ubuntu-2004-builder:
name: contract-lab-ubuntu-2004-builder
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/contract-lab-ubuntu-2004-builder"
TAGS="${IMAGE}:${{ github.sha }}"
echo ::set-output name=tags::${TAGS,,}
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Image
uses: docker/build-push-action@v2
with:
push: true
file: docker/ubuntu-2004-builder.Dockerfile
tags: ${{ steps.prep.outputs.tags }}