forked from ethereum-optimism/op-geth
-
Notifications
You must be signed in to change notification settings - Fork 6
29 lines (29 loc) · 941 Bytes
/
check-docker-build.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
name: Check Docker Build
on:
pull_request:
branches:
- main
- develop
- 'release/**'
paths:
- '**'
jobs:
CheckDockerBuild:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@main
with:
submodules: recursive
token: ${{ secrets.PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checking Docker Build
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
response=$(curl -H 'authorization: Bearer ${{ secrets.PAT }}' -H "Accept: application/vnd.github.v3+json" -s -X GET -G $URL)
UPDATEFILE_DIR=$(echo "${response}" | jq -r '.[] | .filename')
echo $UPDATEFILE_DIR
cmd="docker build -f Dockerfile -t test:v1 ."
echo -e "\e[32m$cmd\e[0m"
$cmd