-
Notifications
You must be signed in to change notification settings - Fork 9
67 lines (55 loc) · 1.8 KB
/
run-test-sh.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: run-test-shell
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 10 * * *'
jobs:
main:
name: Test image
# Only run schedule for the main repository - not forks
if: ${{ github.event_name != 'schedule' || github.repository == 'dlang-tour/core-exec' }}
strategy:
fail-fast: true
matrix:
include:
- { version: dmd-nightly, exec: dmd }
- { version: dmd-beta, exec: dmd }
- { version: dmd, exec: dmd }
- { version: ldc-beta, exec: ldmd2 }
- { version: ldc, exec: ldmd2 }
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build image
uses: docker/build-push-action@v4
with:
push: false
load: true
tags: dlangtour/core-exec:${{ matrix.version }}
build-args: |
DLANG_VERSION=${{ matrix.version }}
DLANG_EXEC=${{ matrix.exec }}
- name: Test image
run: ./test.sh "dlangtour/core-exec:${{ matrix.version }}"
- name: Push image
uses: docker/build-push-action@v4
with:
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
load: false
tags: dlangtour/core-exec:${{ matrix.version }}
build-args: |
DLANG_VERSION=${{ matrix.version }}
DLANG_EXEC=${{ matrix.exec }}