fix: install docker CLI and use kaniko executor image directly
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 21s

This commit is contained in:
Graham McIntire 2026-07-26 18:59:09 -05:00
parent 304053f14b
commit a1525037ae
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -22,21 +22,23 @@ jobs:
TAG="main-${TIMESTAMP}-${SHORT_SHA}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Install Docker CLI
run: |
apt-get update && apt-get install -y docker.io
- name: Build and Push with Kaniko
run: |
KANIKO_VERSION="v1.23.2"
curl -fsSL "https://github.com/GoogleContainerTools/kaniko/releases/download/${KANIKO_VERSION}/executor-linux-amd64" \
-o /usr/local/bin/executor
chmod +x /usr/local/bin/executor
mkdir -p /kaniko/.docker
cat > /kaniko/.docker/config.json <<EOF
{"auths":{"git.mcintire.me":{"username":"graham","password":"${{ secrets.FORGEJO_TOKEN }}"}}}
EOF
/usr/local/bin/executor \
--context=dir://. \
--dockerfile=Dockerfile \
docker run --rm \
-v "$(pwd)":/workspace \
-v /kaniko/.docker:/kaniko/.docker \
gcr.io/kaniko-project/executor:latest \
--context=/workspace \
--dockerfile=/workspace/Dockerfile \
--destination="git.mcintire.me/graham/aprs.me:${{ steps.tag.outputs.tag }}" \
--destination="git.mcintire.me/graham/aprs.me:latest" \
--cache=true