-
Notifications
You must be signed in to change notification settings - Fork 62
43 lines (38 loc) · 1.09 KB
/
build-containers.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 Containers
on:
push:
branches:
- main
- 'SL*'
tags:
- '*'
jobs:
build:
if: github.repository_owner == 'star-bnl'
runs-on: ubuntu-latest
strategy:
matrix:
starenv: [root5, root6]
compiler: [gcc485, gcc11]
env:
STARENV: ${{ matrix.starenv }}-${{ matrix.compiler }}
steps:
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build a release container
uses: docker/build-push-action@v3
with:
build-args: |
starenv=${{ matrix.starenv }}
compiler=${{ matrix.compiler }}
push: true
tags: ghcr.io/${{ github.repository_owner }}/star-sw:${{ steps.branch-name.outputs.current_branch }}-${{ env.STARENV }}