Copy over CI config from gokrazy-odroidxu4-kernel
This commit is contained in:
parent
64f04cc47e
commit
c1d39c566b
@ -1,47 +1,47 @@
|
||||
name: Testboot if labeled please-boot
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
types: [ labeled ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: CI
|
||||
if: ${{ github.event.label.name == 'please-boot' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
# Run on the latest minor release of Go 1.22:
|
||||
go-version: ~1.22
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v4
|
||||
|
||||
name: "Test boot"
|
||||
description: "Test boot u-boot and kernel changes"
|
||||
inputs:
|
||||
github_repository:
|
||||
required: true
|
||||
gh_user:
|
||||
required: true
|
||||
gh_auth_token:
|
||||
required: true
|
||||
bootery_url:
|
||||
required: true
|
||||
bake_host:
|
||||
required: true
|
||||
gokrazy_bakery_password:
|
||||
required: true
|
||||
gokrazy_bake_password:
|
||||
required: true
|
||||
oauth-client-id:
|
||||
required: true
|
||||
oauth-secret:
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Tailscale
|
||||
uses: tailscale/github-action@v2
|
||||
with:
|
||||
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
||||
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
||||
oauth-client-id: ${{ inputs.oauth-client-id }}
|
||||
oauth-secret: ${{ inputs.oauth-secret }}
|
||||
tags: tag:ci
|
||||
|
||||
- name: Test Boot
|
||||
env:
|
||||
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
|
||||
GH_USER: ${{ secrets.GH_USER }}
|
||||
GH_AUTH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
|
||||
GITHUB_REPOSITORY: ${{ inputs.github_repository }}
|
||||
GH_USER: ${{ inputs.gh_user }}
|
||||
GH_AUTH_TOKEN: ${{ inputs.gh_auth_token }}
|
||||
TRAVIS_PULL_REQUEST: ${{ github.event.pull_request.number }}
|
||||
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
BOOTERY_URL: ${{ secrets.BOOTERY_URL }}
|
||||
BAKE_HOST: ${{ secrets.BAKE_HOST }}
|
||||
GOKRAZY_BAKERY_PASSWORD: ${{ secrets.GOKRAZY_BAKERY_PASSWORD }}
|
||||
GOKRAZY_BAKE_PASSWORD: ${{ secrets.GOKRAZY_BAKE_PASSWORD }}
|
||||
BOOTERY_URL: ${{ inputs.bootery_url }}
|
||||
BAKE_HOST: ${{ inputs.bake_host }}
|
||||
GOKRAZY_BAKERY_PASSWORD: ${{ inputs.gokrazy_bakery_password }}
|
||||
GOKRAZY_BAKE_PASSWORD: ${{ inputs.gokrazy_bake_password }}
|
||||
if: ${{ env.GH_USER != 0 }}
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p extrafiles/github.com/gokrazy/breakglass/etc/
|
||||
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPrXgBg9kOZuG7j8ZkguxXbsJ5/bC1oILizs/BPsrF2c anupc@devbox' > extrafiles/github.com/gokrazy/breakglass/etc/breakglass.authorized_keys
|
||||
@ -62,5 +62,5 @@ jobs:
|
||||
echo "Updating u-boot"
|
||||
curl -s --max-time 300 --upload-file u-boot.bin --user gokrazy:${GOKRAZY_BAKE_PASSWORD} http://${BAKE_HOST}/update/device-specific/u-boot.bin
|
||||
echo "Test-booting"
|
||||
cd ~/gokrazy/bakery && GOARCH=arm gokr-boot -require_label=please-boot -set_label=please-merge -bootery_url=$BOOTERY_URL
|
||||
cd ~/gokrazy/bakery && gokr-boot -require_label=please-boot -set_label=please-merge -bootery_url=$BOOTERY_URL
|
||||
fi
|
2
.github/workflows/create-bakery.bash
vendored
2
.github/workflows/create-bakery.bash
vendored
@ -10,7 +10,7 @@ cat > ~/gokrazy/bakery/config.json <<EOT
|
||||
"Update": {
|
||||
"HTTPPassword": "${GOKRAZY_BAKERY_PASSWORD}"
|
||||
},
|
||||
"DeviceType": "odroidhc1",
|
||||
"DeviceType": "rock64",
|
||||
"Packages": [
|
||||
"github.com/gokrazy/breakglass",
|
||||
"github.com/gokrazy/bakery/cmd/bake",
|
||||
|
12
.github/workflows/pull.yml
vendored
12
.github/workflows/pull.yml
vendored
@ -38,3 +38,15 @@ jobs:
|
||||
GOPROXY=direct go install github.com/gokrazy/autoupdate/cmd/...@latest
|
||||
GOPROXY=direct go install github.com/gokrazy/tools/cmd/gokr-packer@latest
|
||||
if ! gokr-has-label please-merge && ! gokr-has-label please-boot; then go install ./cmd/gokr-rebuild-kernel ./cmd/gokr-rebuild-uboot && gokr-rebuild-kernel -overwrite_container_executable=docker && gokr-rebuild-uboot -overwrite_container_executable=docker && GOPROXY=direct go install github.com/gokrazy/autoupdate/cmd/gokr-amend@latest && gokr-amend -set_label=please-boot *.dtb vmlinuz u-boot*.bin boot.scr; fi
|
||||
|
||||
- uses: ./.github/actions/testboot
|
||||
with:
|
||||
github_repository: ${{ secrets.GITHUB_REPOSITORY }}
|
||||
gh_user: ${{ secrets.GH_USER }}
|
||||
gh_auth_token: ${{ secrets.GH_AUTH_TOKEN }}
|
||||
bootery_url: ${{ secrets.BOOTERY_URL }}
|
||||
bake_host: ${{ secrets.BAKE_HOST }}
|
||||
gokrazy_bakery_password: ${{ secrets.GOKRAZY_BAKERY_PASSWORD }}
|
||||
gokrazy_bake_password: ${{ secrets.GOKRAZY_BAKE_PASSWORD }}
|
||||
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
||||
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
||||
|
Loading…
Reference in New Issue
Block a user