Update CI workflow to use custom Docker image for build and streamline Docker push job
Some checks failed
CI / build-test (push) Failing after 55s
CI / docker (push) Has been skipped

This commit is contained in:
2026-02-23 20:23:26 +01:00
parent 1876fc4eed
commit cb6e56180a

View File

@@ -8,7 +8,7 @@ jobs:
build-test:
runs-on: docker
container:
image: golang:1.26
image: gitea.jeanlucmakiola.de/makiolaj/docker-node-and-go:latest
steps:
- name: Checkout code
uses: actions/checkout@v6
@@ -28,25 +28,24 @@ jobs:
runs-on: dind
needs: build-test
if: gitea.event_name == 'push'
container:
image: docker:cli
services:
dind:
image: docker:dind
options: --privileged
env:
DOCKER_TLS_CERTDIR: ""
env:
DOCKER_HOST: tcp://dind:2375
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
run: apk add --no-cache git
- name: Checkout
run: |
GITEA_HOST="${{ gitea.server_url }}"
GITEA_HOST="${GITEA_HOST#https://}"
GITEA_HOST="${GITEA_HOST#http://}"
git clone "https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITEA_HOST}/${{ gitea.repository }}.git" .
git checkout ${{ gitea.sha }}
- name: Log in to Gitea registry
run: |
REGISTRY="${{ gitea.server_url }}"
REGISTRY="${REGISTRY#https://}"
REGISTRY="${REGISTRY#http://}"
echo "${{ secrets.GITEA_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.actor }}" --password-stdin
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ gitea.actor }}" --password-stdin
- name: Build and push
run: |
REGISTRY="${{ gitea.server_url }}"