-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from grebtsew/docker-build-cicd
Create docker-build.yml
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test Docker Build | ||
|
||
on: | ||
# Run on Pull Requests | ||
pull_request: | ||
branches: | ||
- main | ||
- '**' # Or any other branches you want to include | ||
|
||
# Run once a month at midnight on the first day of the month | ||
schedule: | ||
- cron: '0 0 1 * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up Docker Buildx | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Step 3: Build the Docker image | ||
- name: Build Docker image | ||
run: | | ||
docker build -t my-image-name . |