Skip to content

Commit

Permalink
add DockerHub CI
Browse files Browse the repository at this point in the history
  • 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.
26 changes: 16 additions & 10 deletions .github/workflows/docker-image.yml
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 }}

0 comments on commit f665996

Please sign in to comment.