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
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 21s
This commit is contained in:
parent
304053f14b
commit
a1525037ae
1 changed files with 10 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue