-
-
Notifications
You must be signed in to change notification settings - Fork 84
33 lines (33 loc) · 1.14 KB
/
docker-ci.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
name: Build and test docker image
on:
pull_request:
paths:
- Dockerfile
- .github/workflows/docker-ci.yaml
- scripts/build/**
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_docker_image:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- run: sudo chown runner:docker /var/run/docker.sock
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build docker image
uses: docker/build-push-action@v5
with:
tags: oryd/sdk:${{ github.sha }}
push: false
outputs: type=docker,dest=./sdk.tar
- name: run generate.sh and test.sh
run: |
docker load --input ./sdk.tar
rm ./sdk.tar
docker run --mount type=bind,source="$(pwd)",target=/project -e FORCE_PROJECT=client -e FORCE_VERSION=$(cat ./spec/client/latest) -i oryd/sdk:${{ github.sha }} /bin/sh -c "cd /project && ./scripts/generate.sh && ./scripts/test.sh"