fix: use sh instead of bash and replace checkout action with git

- Use sh (built into Alpine) instead of bash to avoid install errors
- Replace actions/checkout@v4 with direct git clone commands
- Add ca-certificates for HTTPS support
- Faster and more reliable for lightweight Alpine containers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-03-06 02:58:28 +00:00
parent 2d37b35d1f
commit 7b61be1a4a
+10 -2
View File
@@ -13,19 +13,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
shell: sh
run: |
apk add --no-cache bash wget
apk add --no-cache git wget ca-certificates
- name: Install Kaniko
shell: sh
run: |
wget -O /usr/local/bin/executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.23.2/executor-linux-amd64
chmod +x /usr/local/bin/executor
- name: Checkout code
uses: actions/checkout@v4
shell: sh
run: |
git clone https://gitea.leeworks.dev/${{ gitea.repository }}.git .
git checkout ${{ gitea.sha }}
- name: Determine image tags
id: tags
shell: sh
run: |
REGISTRY="gitea.leeworks.dev"
REPO_OWNER="${{ gitea.repository_owner }}"
@@ -62,6 +68,7 @@ jobs:
echo "IMAGE_LATEST=${IMAGE_BASE}:latest" >> $GITHUB_OUTPUT
- name: Setup Kaniko config
shell: sh
run: |
mkdir -p /kaniko/.docker
cat > /kaniko/.docker/config.json <<EOF
@@ -75,6 +82,7 @@ jobs:
EOF
- name: Build and push with Kaniko
shell: sh
run: |
echo "Building and pushing image with Kaniko..."
if [[ "${{ steps.tags.outputs.PUSH_LATEST }}" == "true" ]]; then