-
Notifications
You must be signed in to change notification settings - Fork 19
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
1 parent
972d1ed
commit f6f8286
Showing
1 changed file
with
56 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,56 @@ | ||
name: Build and Push Docker Images | ||
|
||
on: | ||
push: | ||
branches: | ||
# - master | ||
- test-branch-github-actions | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Debug Secret Access | ||
run: | | ||
if [ -z "${{ secrets.DOCKER_HUB_USERNAME }}" ]; then | ||
echo "❌ DOCKER_HUB_USERNAME is NOT set!" | ||
exit 1 | ||
else | ||
echo "✅ DOCKER_HUB_USERNAME is set!" | ||
fi | ||
if [ -z "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" ]; then | ||
echo "❌ DOCKER_HUB_ACCESS_TOKEN is NOT set!" | ||
exit 1 | ||
else | ||
echo "✅ DOCKER_HUB_ACCESS_TOKEN is set!" | ||
fi | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push Clients image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./Clients | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/verifywise-frontend:testing | ||
|
||
- name: Build and push Servers image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./Servers | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/verifywise-backend:testing |