fix pipeline?
This commit is contained in:
@@ -16,14 +16,29 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Runs in ubuntu-latest container (node:20-bookworm-slim via DinD)
|
||||
# Docker CLI is available via DOCKER_HOST=tcp://localhost:2376 (DinD sidecar)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 🔎 Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🐳 Install Docker CLI
|
||||
run: |
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg \
|
||||
-o /etc/apt/keyrings/docker.asc
|
||||
chmod a+r /etc/apt/keyrings/docker.asc
|
||||
echo "deb [arch=$(dpkg --print-architecture) \
|
||||
signed-by=/etc/apt/keyrings/docker.asc] \
|
||||
https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
|
||||
> /etc/apt/sources.list.d/docker.list
|
||||
apt-get update && apt-get install -y --no-install-recommends docker-ce-cli
|
||||
|
||||
- name: 🏷️ Set Image Tags
|
||||
id: tags
|
||||
run: |
|
||||
@@ -33,7 +48,6 @@ jobs:
|
||||
SHORT_SHA="${{ gitea.sha }}"
|
||||
SHORT_SHA="${SHORT_SHA:0:8}"
|
||||
|
||||
echo "image=${REGISTRY}/${ORG}/${IMAGE}" >> $GITHUB_OUTPUT
|
||||
echo "tag_latest=${REGISTRY}/${ORG}/${IMAGE}:latest" >> $GITHUB_OUTPUT
|
||||
echo "tag_sha=${REGISTRY}/${ORG}/${IMAGE}:${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
@@ -64,10 +78,11 @@ jobs:
|
||||
docker push ${{ steps.tags.outputs.tag_sha }}
|
||||
|
||||
- name: 📨 Telegram Notification
|
||||
uses: chapvic/telegram-notify@master
|
||||
run: |
|
||||
STATUS="${{ job.status }}"
|
||||
TEXT="🐳 Build: ansible-act-runner:${{ steps.tags.outputs.short_sha }}%0AStatus: ${STATUS}"
|
||||
curl -s -X POST \
|
||||
"https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
||||
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \
|
||||
-d "text=${TEXT}"
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
chat: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
status: ${{ job.status }}
|
||||
title: "🐳 Build: ansible-act-runner:${{ steps.tags.outputs.short_sha }}"
|
||||
|
||||
Reference in New Issue
Block a user