forked from VUnit/vunit
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.03 KB
/
images.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
name: 'images'
on:
push:
paths:
- '.github/workflows/images.yml'
- '.github/images.sh'
schedule:
- cron: '0 0 * * 5'
env:
DOCKER_BUILDKIT: '1'
jobs:
build:
strategy:
fail-fast: false
matrix:
task: [
{ tag: llvm, pkg: llvm-9 },
{ tag: mcode, pkg: mcode },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
env:
TAG: ${{ matrix.task.tag }}
PKG: ${{ matrix.task.pkg }}
run: |
./.github/images.sh
- name: Login to ghcr.io
if: github.event_name != 'pull_request' && github.repository == 'VUnit/vunit'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: gha
password: ${{ github.token }}
- name: Docker push
if: github.event_name != 'pull_request' && github.repository == 'VUnit/vunit'
run: |
DIMG="vunit/dev/${{ matrix.task.tag }}"
docker tag "$DIMG" "ghcr.io/$DIMG"
docker push "ghcr.io/$DIMG"