Update .github/workflows/main.yml
Some checks failed
Build & Push Docker to Gitea Registry / build-and-push (push) Failing after 24s
Some checks failed
Build & Push Docker to Gitea Registry / build-and-push (push) Failing after 24s
This commit is contained in:
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
@@ -5,29 +5,35 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.quocanh.me
|
REGISTRY: git.quocanh.me
|
||||||
OWNER: Coder-Vippro
|
OWNER: coder-vippro # lowercase!
|
||||||
IMAGE: chatgpt-discord-bot
|
IMAGE: chatgpt-discord-bot
|
||||||
TAG: latest
|
TAG: latest
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest # or use self-hosted runner that can reach your registry
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Debug secrets (temporary)
|
||||||
|
run: |
|
||||||
|
if [ -z "${{ secrets.REGISTRY_USERNAME }}" ]; then
|
||||||
|
echo "REGISTRY_USERNAME is EMPTY"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "REGISTRY_USERNAME is set"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Login to Gitea registry
|
- name: Login to Gitea registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${REGISTRY}" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login "${REGISTRY}" -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||||
|
|
||||||
- name: Create or use buildx builder
|
- name: Set up Docker Buildx
|
||||||
run: |
|
uses: docker/setup-buildx-action@v3
|
||||||
docker buildx create --name ci-builder --use || docker buildx use ci-builder
|
|
||||||
docker buildx inspect --bootstrap
|
|
||||||
|
|
||||||
- name: Build & push multi-arch image
|
- name: Build & push multi-arch image
|
||||||
run: |
|
run: |
|
||||||
@@ -39,5 +45,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify pushed image (optional)
|
- name: Verify pushed image (optional)
|
||||||
run: |
|
run: |
|
||||||
echo "Listing manifest for ${REGISTRY}/${OWNER}/${IMAGE}:${TAG}"
|
docker buildx imagetools inspect ${REGISTRY}/${OWNER}/${IMAGE}:${TAG} || true
|
||||||
docker buildx imagetools inspect ${REGISTRY}/${OWNER}/${IMAGE}:${TAG}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user