-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (38 loc) · 1.21 KB
/
build_docker.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
name: Build - docker
on:
push:
branches:
- "**"
paths:
- "tools/docker_for_building/**"
- ".github/workflows/build_docker.yml"
env:
IMAGE_NAME_PREFIX: ten_building_
jobs:
build:
strategy:
matrix:
include:
- image_name: "ubuntu2204"
workdir: "tools/docker_for_building/ubuntu/22.04"
platforms: linux/amd64,linux/arm64
- image_name: "ubuntu1804"
workdir: "tools/docker_for_building/ubuntu/18.04"
platforms: linux/amd64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build & Publish to Github Container Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository_owner }}/${{ env.IMAGE_NAME_PREFIX }}${{ matrix.image_name }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: ${{ matrix.workdir }}
platforms: ${{ matrix.platforms }}
snapshot: true
tags: "${{ github.ref == 'refs/heads/main' && 'latest,' || '' }}"