-
Notifications
You must be signed in to change notification settings - Fork 93
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 #4877 from jaredb96/dockerhub-push-gh-actions
Dockerhub push gh actions
- Loading branch information
Showing
1 changed file
with
38 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,38 @@ | ||
name: HMDA Docker Hub Image Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
push_to_dockerhub: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build image of HMDA Platform only | ||
run: | | ||
sbt -batch clean hmda-platform/docker:publishLocal | ||
continue-on-error: true | ||
|
||
- name: Tag Docker image | ||
run: docker tag $(docker images --filter=reference="hmda/hmda-platform:latest" --format "{{.ID}}") ${{ secrets.DOCKERHUB_USERNAME }}/hmda:latest | ||
|
||
- name: Push image to Docker Hub | ||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/hmda:latest | ||
|
||
- name: Check image for CVEs | ||
uses: docker/scout-action@v1 | ||
with: | ||
command: cves | ||
image: ${{ secrets.DOCKERHUB_USERNAME }}/hmda:latest |