Skip to content

Commit

Permalink
Added rules for Docker push on Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
amusarra committed Aug 17, 2023
1 parent f5c5772 commit 60c55ab
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, analyze and build Docker image
name: Build
on:
push:
branches:
Expand All @@ -9,7 +9,7 @@ on:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
name: Build, analyze, build Docker image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -38,4 +38,13 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar --info
- name: Build the Docker image
run: ./gradlew buildDockerImage
run: ./gradlew buildDockerImage
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Change the Docker Tag image
run: docker tag liferay-portal-security-audit-liferay:liferay-portal-security-audit-liferay:7.4.3.85-ga85 ${{ secrets.DOCKER_USERNAME }}/liferay-portal-security-audit-liferay:1.5.0_7.4.3.85-ga85
- name: Push the Docker image
run: docker push ${{ secrets.DOCKER_USERNAME }}/liferay-portal-security-audit-liferay:1.5.0_7.4.3.85-ga85

0 comments on commit 60c55ab

Please sign in to comment.