-
Notifications
You must be signed in to change notification settings - Fork 40
48 lines (44 loc) · 1.42 KB
/
pull_request.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
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Intel Corporation
name: Pull Request
on: [pull_request]
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout and build
- uses: actions/checkout@v3
- name: Build Docker image
run: |
make docker-build
# Format the code
- name: Go Format
run: |
make fmt
- name: Show all CI changes
run: |
git --no-pager diff
# Build again and commit
- name: Build Docker image after format
run: |
make docker-build
- name: Update PR with changes
uses: gr2m/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
Updated with changes from CI
branch: ${{ github.event.pull_request.head.ref }}
author: "Github Actions <actions@github>"
commit-message: "Actions: Updated with changes from CI"
# - name: Run AIAB
# run: |
# sudo apt-get update
# sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
# sudo chmod a+x /usr/local/bin/yq
# make docker-build
# make run-aiab