diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d8aace7..bdfebe9 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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 }}" @@ -55,4 +54,4 @@ jobs: IMAGE="$REGISTRY/${{ gitea.repository }}" docker build -t "$IMAGE:${{ gitea.sha }}" -t "$IMAGE:latest" . docker push "$IMAGE:${{ gitea.sha }}" - docker push "$IMAGE:latest" \ No newline at end of file + docker push "$IMAGE:latest"