mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-15 11:21:29 +00:00
Create chatops_build.yml
ready fire aim
This commit is contained in:
parent
2e594375a9
commit
2a8b5f9e33
1 changed files with 56 additions and 0 deletions
56
.github/workflows/chatops_build.yml
vendored
Normal file
56
.github/workflows/chatops_build.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: test pull request
|
||||
# This workflow is triggered on pushes to the repository.
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build_imagel:
|
||||
name: Build Image
|
||||
# This job runs on self hosted Linux machine, with public label
|
||||
runs-on: [self-hosted, public, x64]
|
||||
steps:
|
||||
# - uses: rokroskar/workflow-run-cleanup-action@v0.2.2
|
||||
# env:
|
||||
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: fix sudo ownership
|
||||
run: |
|
||||
stat build && sudo chown -R $(whoami) build || echo "fresh workspace detected"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
path: build
|
||||
clean: false
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: armbian/ci-testing-tools
|
||||
path: ci-testing-tools
|
||||
- name: listen for PR Comments
|
||||
uses: machine-learning-apps/actions-chatops@master
|
||||
with:
|
||||
APP_PEM: ${{ secrets.APP_PEM }}
|
||||
APP_ID: ${{ secrets.APP_ID }}
|
||||
TRIGGER_PHRASE: "/build_image"
|
||||
INDICATOR_LABEL: "test-label"
|
||||
env: # you must supply GITHUB_TOKEN
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
id: prcomm
|
||||
- name: Find SBC target and build kernel
|
||||
if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true'
|
||||
shell: bash {0}
|
||||
run: |
|
||||
cd build
|
||||
GIT_COMMIT=$(echo $GITHUB_SHA)
|
||||
GIT_PREVIOUS_COMMIT=$(git rev-parse origin/$GITHUB_BASE_REF)
|
||||
ARMBIAN_BRANCH=current
|
||||
ARMBIAN_RELEASE=focal
|
||||
ARMBIAN_BOARD=${{ steps.prcomm.outputs.TRAILING_TOKEN }}
|
||||
cd ..
|
||||
env
|
||||
source ci-testing-tools/jenkins_ci.sh
|
||||
|
||||
mkdir -p build/userpatches
|
||||
cp -f ci-testing-tools/*.conf build/userpatches/
|
||||
cd build
|
||||
git checkout ${GITHUB_SHA}
|
||||
git branch -v
|
||||
export GPG_TTY=$(tty)
|
||||
build_image minimal
|
Loading…
Add table
Reference in a new issue