-
Notifications
You must be signed in to change notification settings - Fork 171
44 lines (42 loc) · 1.26 KB
/
docker-preview.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
name: Docker Compose Preview
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.04
- centos-7
- centos-8
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: vars
id: vars
run: |
ostype=`os=${{ matrix.os }}; echo ${os%-*}`
osversion=`os=${{ matrix.os }}; echo ${os#*-}`
echo "::set-output name=ostype::$ostype"
echo "::set-output name=osversion::$osversion"
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./insider-preview/Dockerfile.preview
push: true
build-args: |
OS=${{ steps.vars.outputs.ostype }}
VERSION=${{ steps.vars.outputs.osversion }}
tags: |
ghcr.io/${{ github.repository_owner }}/baikaldb-preview:${{ matrix.os }}