first commit
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Sync to CNB / sync (push) Has been cancelled
Delete old workflow runs / del_runs (push) Has been cancelled
Upstream Sync / Sync latest commits from upstream repo (push) Has been cancelled

This commit is contained in:
2026-01-30 16:57:44 +08:00
commit 3d175d75af
119 changed files with 35834 additions and 0 deletions

75
.github/workflows/docker-build.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- '.cnb.yml'
- '.gitignore'
- '.github/workflows/clean-up.yml'
- '.cnb/web_trigger.yml'
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
- '.gitignore'
- '.cnb.yml'
- '.github/workflows/clean-up.yml'
- '.cnb/web_trigger.yml'
permissions:
contents: read
packages: write
id-token: write
actions: write
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into GHCR
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64/v8
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/i-tools:latest
${{ vars.DOCKERHUB_USERNAME }}/i-tools:latest
- name: Post build cleanup
run: docker builder prune --force