-
Notifications
You must be signed in to change notification settings - Fork 12
34 lines (32 loc) · 987 Bytes
/
validate-pr.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
name: PR Docker image
on:
pull_request_target:
types: [opened, synchronize, reopened]
branches:
- 'for-next'
jobs:
validate:
env:
IMAGE: colomoto/colomoto-docker:pr${{ github.event.pull_request.number }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Tools metadata
run: |
pip install -r hooks/requirements.txt
python hooks/tools_metadata.py
- name: Docker image build
run: sh hooks/build
- name: Login to docker hub
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Push image
uses: actions-hub/docker@master
with:
args: push ${IMAGE}
- name: Docker image validation
run: docker run --rm $IMAGE env validate.sh