Github actions update (#3191)

This commit is contained in:
Igor Pečovnik 2021-10-13 12:50:18 +02:00 committed by GitHub
parent ae7c00689e
commit 0fe69c2fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 7 deletions

View File

@ -7,7 +7,7 @@ jobs:
Cache:
name: Make cache
name: Determine needed targets
runs-on: [self-hosted, Linux, cache]
if: ${{ github.repository_owner == 'armbian' }}
outputs:
@ -82,13 +82,12 @@ jobs:
cd ..
cd build-rootfs
PARTS=$(cat filelist.txt | wc -l)
split -d --numeric=1 --number=r/${PARTS} --additional-suffix=.conf --suffix-length=2 filelist.txt split-
split -d --numeric=1 --number=r/${PARTS} --additional-suffix=.conf --suffix-length=3 filelist.txt split-
- name: Prepare matrix
id: list_dirs
run:
PARTS=$(cat filelist.txt | wc -l)
MATRIX=$(seq -w 01 "$PARTS")
echo ::set-output name=matrix::$(for x in $(echo "${MATRIX}"); do echo $x; done|jq -cnR '[inputs | select(length>0)]' | jq)
run: |
PARTS=$(cat build-rootfs/filelist.txt | wc -l)
echo ::set-output name=matrix::$(for x in $(seq -w 1 $PARTS); do echo $x; done|jq -cnR '[inputs | select(length>0)]' | jq)
Job:

View File

@ -1,4 +1,4 @@
name: Docker hub build
name: Build Docker hub image
# This workflow is triggered 1st, 16th and 31st
on:

19
.github/workflows/rebase.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Automatic Rebase
on:
issue_comment:
types: [created]
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}