fix: CI workflow - remove container override, use actions/checkout@v4 #2

Merged
rock merged 2 commits from fix/ci-container-override into main 2026-09-07 05:48:26 +00:00
Showing only changes of commit 1a3e7975e9 - Show all commits
+7 -15
View File
@@ -8,28 +8,16 @@ on:
jobs: jobs:
test-build-push: test-build-push:
runs-on: golang runs-on: golang
container:
image: golang:1.26
env: env:
GOPRIVATE: forgejo.riotpiao.com GOPRIVATE: forgejo.riotpiao.com
REGISTRY: forgejo.riotpiao.com REGISTRY: forgejo.riotpiao.com
IMAGE: forgejo.riotpiao.com/rock/poimen-workflows IMAGE: forgejo.riotpiao.com/rock/poimen-workflows
steps: steps:
- name: Install Node.js and Docker for actions runtime - name: Install Node.js for actions runtime
run: apt-get update && apt-get install -y nodejs docker.io run: apt-get update && apt-get install -y nodejs
- name: Configure git authentication
run: |
git config --global url."https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
git config --global credential.helper store
echo "https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com" >> ~/.git-credentials
- name: Checkout code - name: Checkout code
run: | uses: actions/checkout@v4
git init
git remote add origin https://forgejo.riotpiao.com/rock/poimen-workflows.git
git fetch origin ${{ github.head_ref || github.ref_name }} --depth=1
git checkout FETCH_HEAD
- name: Download dependencies - name: Download dependencies
run: go mod download run: go mod download
@@ -47,6 +35,10 @@ jobs:
id: sha id: sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install Docker CLI
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: apt-get update && apt-get install -y docker.io
- name: Registry login - name: Registry login
if: github.ref == 'refs/heads/main' && github.event_name == 'push' if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: | run: |