-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Disk Space Cleaning Tool (#730)
- Loading branch information
Showing
1 changed file
with
45 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,44 +5,60 @@ on: | |
- cron: "0 0 */7 * *" # every 7 days | ||
push: | ||
branches: | ||
- main | ||
- main | ||
paths: | ||
- "Dockerfile" | ||
- ".github/workflows/docker_build.yml" | ||
pull_request: | ||
branches: | ||
- main | ||
- main | ||
paths: | ||
- './Dockerfile' | ||
- "Dockerfile" | ||
- ".github/workflows/docker_build.yml" | ||
types: [opened, synchronize, reopened, ready_for_review, review_requested] | ||
#workflow_dispatch: # Add this line to enable manual trigger | ||
|
||
jobs: | ||
ci-check: | ||
if: github.event_name == 'pull_request' | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: true | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build ARC | ||
uses: docker/build-push-action@v2 | ||
|
||
- name: Build Docker Image (No Push) | ||
if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: false | ||
|
||
build-and-push: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Build and push ARC | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/arc:latest | ||
|
||
|
||
- name: Login to Docker Hub | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: docker/[email protected] | ||
|
||
- name: Build and Push Docker Image | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/arc:latest |