forked from 0xWheatyz/SPARC
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:
@@ -13,19 +13,25 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
apk add --no-cache bash wget
|
apk add --no-cache git wget ca-certificates
|
||||||
|
|
||||||
- name: Install Kaniko
|
- name: Install Kaniko
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
wget -O /usr/local/bin/executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.23.2/executor-linux-amd64
|
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
|
chmod +x /usr/local/bin/executor
|
||||||
|
|
||||||
- name: Checkout code
|
- 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
|
- name: Determine image tags
|
||||||
id: tags
|
id: tags
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
REGISTRY="gitea.leeworks.dev"
|
REGISTRY="gitea.leeworks.dev"
|
||||||
REPO_OWNER="${{ gitea.repository_owner }}"
|
REPO_OWNER="${{ gitea.repository_owner }}"
|
||||||
@@ -62,6 +68,7 @@ jobs:
|
|||||||
echo "IMAGE_LATEST=${IMAGE_BASE}:latest" >> $GITHUB_OUTPUT
|
echo "IMAGE_LATEST=${IMAGE_BASE}:latest" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup Kaniko config
|
- name: Setup Kaniko config
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /kaniko/.docker
|
mkdir -p /kaniko/.docker
|
||||||
cat > /kaniko/.docker/config.json <<EOF
|
cat > /kaniko/.docker/config.json <<EOF
|
||||||
@@ -75,6 +82,7 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Build and push with Kaniko
|
- name: Build and push with Kaniko
|
||||||
|
shell: sh
|
||||||
run: |
|
run: |
|
||||||
echo "Building and pushing image with Kaniko..."
|
echo "Building and pushing image with Kaniko..."
|
||||||
if [[ "${{ steps.tags.outputs.PUSH_LATEST }}" == "true" ]]; then
|
if [[ "${{ steps.tags.outputs.PUSH_LATEST }}" == "true" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user