auto-update to f7aa474cb20be8e9cb8035f51a87287e65ba7f63 #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Boot | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: CI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
# Run on the latest minor release of Go 1.19: | |
go-version: ^1.19 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Ensure all files were formatted as per gofmt | |
run: | | |
[ "$(gofmt -l $(find . -name '*.go') 2>&1)" = "" ] | |
- name: Test Boot | |
env: | |
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | |
GH_USER: ${{ secrets.GH_USER }} | |
GH_AUTH_TOKEN: ${{ secrets.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 }} | |
GOKRAZY_BAKERY_PASSWORD: ${{ secrets.GOKRAZY_BAKERY_PASSWORD }} | |
if: ${{ env.GH_USER != 0 }} | |
run: | | |
.github/workflows/create-bakery.bash | |
GOPROXY=direct go install github.com/gokrazy/autoupdate/cmd/...@latest | |
GOPROXY=direct go install github.com/gokrazy/tools/cmd/gok@latest | |
gok -i bakery add . | |
cd ~/gokrazy/bakery && gokr-boot -update_root -require_label=please-boot -set_label=please-merge -bootery_url=$BOOTERY_URL | |
- name: Amend Pull Request | |
env: | |
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | |
GH_USER: ${{ secrets.GH_USER }} | |
GH_AUTH_TOKEN: ${{ secrets.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 }} | |
if: ${{ env.GH_USER != 0 }} | |
run: | | |
go install ./cmd/gokr-update-eeprom | |
gokr-update-eeprom | |
GOPROXY=direct go install github.com/gokrazy/autoupdate/cmd/gokr-amend@latest && gokr-amend -set_label=please-boot *.bin | |
- name: Merge if boot successful | |
env: | |
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | |
GH_USER: ${{ secrets.GH_USER }} | |
GH_AUTH_TOKEN: ${{ secrets.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 }} | |
run: | | |
{ set +e; gokr-merge -require_label=please-merge; ret=$?; [ $ret -eq 2 ] || exit $ret; } | |