Some checks failed
Build & Push Docker to Gitea Registry / build-and-push (push) Failing after 7s
38 lines
837 B
YAML
38 lines
837 B
YAML
name: Build & Push Docker to Gitea Registry
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.quocanh.me
|
|
OWNER: coder-vippro
|
|
IMAGE: chatgpt-discord-bot
|
|
TAG: latest
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest # khuyên dùng runner của bạn
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea registry
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
|
| docker login "$REGISTRY" \
|
|
-u "${{ secrets.REGISTRY_USERNAME }}" \
|
|
--password-stdin
|
|
|
|
- name: Setup buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build & push
|
|
run: |
|
|
docker buildx build \
|
|
--platform linux/amd64,linux/arm64 \
|
|
-t $REGISTRY/$OWNER/$IMAGE:$TAG \
|
|
--push \
|
|
.
|