Add cheating bootstrap CI container, with gocheckout pre-installed
This commit is contained in:
@@ -3,10 +3,32 @@ name: CI
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
# This step builds the `gas/ci` docker image.
|
||||
# There's a tricky bootstrapping problem here. Let's use Alpine and install `gocheckout` first
|
||||
# thing.
|
||||
# These steps build the `gas/ci` docker image.
|
||||
# There's a tricky bootstrapping problem here. We'll try to cheat first, and if that doesn't
|
||||
# work, then we'll do a full bootstrapping build starting from Alpine and installing `gocheckout`
|
||||
# first thing.
|
||||
build-docker:
|
||||
container:
|
||||
image: gas/ci
|
||||
volumes:
|
||||
- woodpecker-gocache:/go-cache-volume
|
||||
env:
|
||||
GOPATH: /go-cache-volume
|
||||
GOCACHE: /go-cache-volume/build-cache
|
||||
steps:
|
||||
- name: checkout
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gocheckout
|
||||
|
||||
- name: build CI container
|
||||
run: docker build -t gas/ci ops/devcontainer
|
||||
|
||||
# Fallback: full bootstrap build. This one is quite slow.
|
||||
build-docker-bootstrap:
|
||||
needs: build-docker
|
||||
if: ${{ needs.build-docker.result == "failure" }}
|
||||
|
||||
container:
|
||||
image: alpine:3.22
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user