Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Disk Space Cleaning Tool #730

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 45 additions & 29 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading