Skip to content

Commit

Permalink
Set docker credentials as env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dadoonet committed Oct 23, 2023
1 parent 6a24613 commit c6d0ee5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ jobs:
key: fscrawler-docker-cache-${{ runner.os }}-${{ hashFiles('pom.xml') }}
continue-on-error: true
- name: Login to Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_TOKEN }}
- name: Deploy with Maven
run: mvn --batch-mode deploy -DskipTests
env:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ jobs:
key: fscrawler-docker-cache-${{ runner.os }}-${{ hashFiles('pom.xml') }}
continue-on-error: true
- name: Login to Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_TOKEN }}
- name: Build the docker images
run: mvn --batch-mode install -DskipTests

0 comments on commit c6d0ee5

Please sign in to comment.