ci: add new workflow to build latest image
Some checks failed
build-docker-images-for-latest-release / build-and-push (push) Failing after 2m44s

This commit is contained in:
fly6516 2024-12-29 10:59:06 +08:00
parent deb5f8d77e
commit a8f1f9d5ed

View File

@ -0,0 +1,41 @@
name: build-docker-images-for-latest-release
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: http://fly6516.synology.me:4000/Gitea_Action/checkout@v2
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: http://fly6516.synology.me:4000/docker/setup-buildx-action@v2
# Log in to Gitea Docker Registry
- name: Log in to Gitea Docker Registry
uses: http://fly6516.synology.me:4000/docker/login-action@v2
with:
registry: fly6516.synology.me:8080
username: ${{ secrets.GITEA_USERNAME }}
password: ${{ secrets.GITEA_PASSWORD }}
# Build and push the Docker image
- name: Build and Push Docker Image
uses: http://fly6516.synology.me:4000/docker/build-push-action@v4
with:
push: true
tags: fly6516.synology.me:8080/multilang:latest
context: auto build for multilang latest
# Optional: Verify the pushed image
- name: Verify Docker Image
run: |
docker pull fly6516.synology.me:8080/multilang:latest
docker run --rm fly6516.synology.me:8080/multilang:latest bash -c "echo 'Image verified'"