diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml index 0c95c539..00f9c2d2 100644 --- a/.github/workflows/build_and_push.yml +++ b/.github/workflows/build_and_push.yml @@ -42,6 +42,18 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.ref_name }} + - name: Free Up GitHub Actions Ubuntu Runner Disk Space + uses: jlumbroso/free-disk-space@main + with: + # This might remove tools that are actually needed, if set to "true" but frees about 6 GB + tool-cache: false + + # All of these default to true, but feel free to set to "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: false + swap-storage: true - name: Prepare id: prepare run: | @@ -77,6 +89,18 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.ref_name }} + - name: Free Up GitHub Actions Ubuntu Runner Disk Space + uses: jlumbroso/free-disk-space@main + with: + # This might remove tools that are actually needed, if set to "true" but frees about 6 GB + tool-cache: false + + # All of these default to true, but feel free to set to "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: false + swap-storage: true - name: Prepare id: prepare run: | diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml deleted file mode 100644 index 0e7177ac..00000000 --- a/.github/workflows/build_test.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: build-test-image-ghcr - -run-name: 构建分支 ${{ github.event.inputs.branch }} 镜像并推送 ghcr.io ${{ github.event.inputs.tag }} - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to build' - default: 'main' - required: true - tag: - description: 'Image Tag' - default: 'latest' - required: true - - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ inputs.branch }} - - name: Free Up GitHub Actions Ubuntu Runner Disk Space - uses: jlumbroso/free-disk-space@main - with: - # This might remove tools that are actually needed, if set to "true" but frees about 6 GB - tool-cache: false - - # All of these default to true, but feel free to set to "false" if necessary for your workflow - android: true - dotnet: true - haskell: true - large-packages: false - swap-storage: true - - name: Setup Environment - run: | - echo "image_name=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/sqlbot" >> $GITHUB_ENV - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - image: tonistiigi/binfmt:qemu-v7.0.0-28 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push multi-arch image - uses: docker/build-push-action@v6 - with: - platforms: linux/amd64,linux/arm64 - push: true - provenance: false - file: Dockerfile - tags: ${{ env.image_name }}:${{ inputs.tag }} \ No newline at end of file