ci: install node in the job containers so actions/checkout can run (#8)
This commit is contained in:
@@ -8,8 +8,8 @@ name: build
|
|||||||
# daemon keeps that contract and means a knox change needs no registry
|
# daemon keeps that contract and means a knox change needs no registry
|
||||||
# credentials at all.
|
# credentials at all.
|
||||||
#
|
#
|
||||||
# Images are Debian-based on purpose: act_runner injects a glibc Node into the
|
# act_runner runs JS actions (actions/checkout) with whatever `node` is on the
|
||||||
# job container to run JS actions (actions/checkout), which fails on musl.
|
# job container's PATH, so each job installs one before checkout.
|
||||||
#
|
#
|
||||||
# Deployment stays with tf-net: this workflow only makes the new image available
|
# Deployment stays with tf-net: this workflow only makes the new image available
|
||||||
# and restarts the stack when the app is already installed.
|
# and restarts the stack when the app is already installed.
|
||||||
@@ -33,8 +33,10 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: golang:1.27
|
image: golang:1.27-alpine
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install node for JS actions
|
||||||
|
run: apk add --no-cache nodejs
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: go vet ./... && go test ./...
|
- run: go vet ./... && go test ./...
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: golang:1.27
|
image: docker:27-cli
|
||||||
# Whitelisted in the runner config (valid_volumes): the host daemon and
|
# Whitelisted in the runner config (valid_volumes): the host daemon and
|
||||||
# the CasaOS app directory where compose files live.
|
# the CasaOS app directory where compose files live.
|
||||||
volumes:
|
volumes:
|
||||||
@@ -51,13 +53,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
IMAGE: docker.notsosm.art/knox
|
IMAGE: docker.notsosm.art/knox
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install node for JS actions
|
||||||
|
run: apk add --no-cache nodejs git
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install docker CLI
|
- name: Check the daemon
|
||||||
run: |
|
run: docker version --format '{{.Server.Version}}'
|
||||||
apt-get update -qq
|
|
||||||
apt-get install -y -qq --no-install-recommends docker.io >/dev/null
|
|
||||||
docker version --format '{{.Server.Version}}'
|
|
||||||
|
|
||||||
- name: Build image on the host daemon
|
- name: Build image on the host daemon
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user