-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
EmilienCourt
authored and
EmilienCourt
committed
Sep 18, 2024
1 parent
56bc536
commit f665996
Showing
1 changed file
with
16 additions
and
10 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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
name: Docker Image CI | ||
name: Publish Docker image | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
push_to_registry: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
build: | ||
- name: DockerHub Login | ||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
runs-on: ubuntu-latest | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_REPO }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag dfir-o365rc:$(date +%s) | ||
- name: Docker Push | ||
run: docker push ${{ secrets.DOCKERHUB_REPO }} |