-
Notifications
You must be signed in to change notification settings - Fork 25
57 lines (49 loc) · 1.71 KB
/
eden-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
56
57
name: eden-builder container
on:
workflow_dispatch:
push:
branches:
- main
- "test/*"
paths:
- "docker/eden-builder.Dockerfile"
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
paths:
- "docker/eden-builder.Dockerfile"
jobs:
eden-builder-container:
name: eden-builder container
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 }}/eden-builder"
TAGS="${IMAGE}:${{ github.sha }}"
if [[ $GITHUB_REF == ref/head/main ]]; then
TAGS="${TAGS},${IMAGE}:latest"
fi
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/eden-builder.Dockerfile
tags: ${{ steps.prep.outputs.tags }}