CI: Fix bugs in new CI flow

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-04-13 13:31:41 +02:00
parent 8dd3d7db0c
commit de3a4941ed
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
10 changed files with 43 additions and 176 deletions

View file

@ -11,7 +11,7 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -21,18 +21,11 @@ jobs:
id-token: write id-token: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install required packages
run: |
pacman -Syy --noconfirm \
curl \
git \
git-lfs \
make \
tar
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true lfs: true
show-progress: false show-progress: false
submodules: true
- name: Marking workdir safe - name: Marking workdir safe
run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot
- name: Generate documentation - name: Generate documentation
@ -54,7 +47,6 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Log into registry - name: Log into registry
uses: docker/login-action@v3 uses: docker/login-action@v3
@ -72,7 +64,7 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -80,16 +72,12 @@ jobs:
services: services:
crdb: crdb:
image: luzifer/crdb-gh-service image: luzifer/crdb-gh-service
options: --health-cmd "curl -sSf http://localhost:8080/health" --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
cockroachdb-bin \ cockroachdb-bin
git \
go \
make
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
show-progress: false show-progress: false
@ -115,7 +103,7 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -127,15 +115,11 @@ jobs:
MYSQL_PASSWORD: twitch-bot-pass MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot MYSQL_USER: twitch-bot
options: --health-cmd "healthcheck.sh --connect --innodb_initialized" --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients mariadb-clients
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -161,7 +145,7 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -173,15 +157,11 @@ jobs:
MYSQL_PASSWORD: twitch-bot-pass MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot MYSQL_USER: twitch-bot
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients mariadb-clients
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -207,7 +187,7 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -217,15 +197,8 @@ jobs:
image: postgres:15 image: postgres:15
env: env:
POSTGRES_PASSWORD: twitch-bot-pass POSTGRES_PASSWORD: twitch-bot-pass
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
show-progress: false show-progress: false
@ -244,35 +217,14 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Marking workdir safe - name: Marking workdir safe
run: | run: |
@ -300,35 +252,14 @@ jobs:
run: run:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Marking workdir safe - name: Marking workdir safe
run: | run: |

View file

@ -36,7 +36,7 @@ frontend_lint: node_modules
src src
node_modules: node_modules:
npm ci npm ci --include dev
# --- Tools # --- Tools

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -21,20 +21,11 @@ permissions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install required packages
run: |
pacman -Syy --noconfirm \
curl \
git \
git-lfs \
make \
tar
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true lfs: true
show-progress: false show-progress: false
submodules: true
- name: Marking workdir safe - name: Marking workdir safe
run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot

View file

@ -12,7 +12,6 @@ runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Log into registry - name: Log into registry

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -18,18 +18,17 @@ runs-on: ubuntu-latest
services: services:
crdb: crdb:
image: luzifer/crdb-gh-service image: luzifer/crdb-gh-service
options: >-
--health-cmd "curl -sSf http://localhost:8080/health"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
cockroachdb-bin \ cockroachdb-bin
git \
go \
make
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -22,17 +22,16 @@ services:
MYSQL_PASSWORD: twitch-bot-pass MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot MYSQL_USER: twitch-bot
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients mariadb-clients
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -22,17 +22,16 @@ services:
MYSQL_PASSWORD: twitch-bot-pass MYSQL_PASSWORD: twitch-bot-pass
MYSQL_ROOT_PASSWORD: root-pass MYSQL_ROOT_PASSWORD: root-pass
MYSQL_USER: twitch-bot MYSQL_USER: twitch-bot
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages - name: Install required packages
run: | run: |
pacman -Syy --noconfirm \ pacman -Syy --noconfirm \
git \
go \
make \
mariadb-clients mariadb-clients
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -20,18 +20,13 @@ services:
image: postgres:15 image: postgres:15
env: env:
POSTGRES_PASSWORD: twitch-bot-pass POSTGRES_PASSWORD: twitch-bot-pass
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
git \
go \
make
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
show-progress: false show-progress: false

View file

@ -8,7 +8,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -16,31 +16,8 @@ container:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Marking workdir safe - name: Marking workdir safe

View file

@ -7,7 +7,7 @@ defaults:
shell: bash shell: bash
container: container:
image: luzifer/archlinux image: luzifer/gh-arch-env
env: env:
CGO_ENABLED: 0 CGO_ENABLED: 0
GOPATH: /go GOPATH: /go
@ -15,31 +15,8 @@ container:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Enable custom AUR package repo
run: echo -e "[luzifer]\nSigLevel = Never\nServer = https://archrepo.hub.luzifer.io/\$arch" >>/etc/pacman.conf
- name: Install required packages
run: |
pacman -Syy --noconfirm \
awk \
curl \
diffutils \
git \
git-lfs \
go \
golangci-lint-bin \
make \
nodejs-lts-hydrogen \
npm \
tar \
trivy \
unzip \
which \
zip
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
lfs: true
show-progress: false show-progress: false
- name: Marking workdir safe - name: Marking workdir safe