-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (35 loc) · 1.04 KB
/
build-docker.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
name: Build Docker
on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
paths-ignore:
- '.devcontainer/**'
- '**.md'
pull_request:
branches: [ "main" ]
env:
GRAPH_DESIGNER_IMAGE_NAME: ten_graph_designer
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: '0'
- id: pre-step
shell: bash
run: echo "image-tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Build & Publish Docker Image for Graph Designer
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.GRAPH_DESIGNER_IMAGE_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: .
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}${{ steps.pre-step.outputs.image-tag }}"
no_push: ${{ github.event_name == 'pull_request' }}