-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add dockerhub build for main branch
- Loading branch information
1 parent
0c955e5
commit 4f0449b
Showing
2 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
17 changes: 6 additions & 11 deletions
17
.github/workflows/dockerhub.yml → .github/workflows/dockerhub-dev.yml
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
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,63 @@ | ||
name: Build a Push Latest Docker Image to Docker Hub | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Checks"] | ||
branches: ["main"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
docker: | ||
name: Build and deploy latest image Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Build and push ui | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: ./ui | ||
platforms: linux/arm64, linux/amd64 | ||
push: true | ||
tags: 0xpolygon/issuernode-ui:${{ env.IMAGE_TAG }} | ||
|
||
- name: Build and push amd64 image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
push: true | ||
tags: 0xpolygon/issuernode:${{ env.IMAGE_TAG }} | ||
|
||
- name: Rename Docker Arm File | ||
run: | | ||
mv Dockerfile Dockerfile-amd | ||
mv Dockerfile-arm Dockerfile | ||
- name: Build and push arm64 image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
IMAGE_TAG: latest | ||
with: | ||
context: . | ||
platforms: linux/arm64 | ||
push: true | ||
tags: 0xpolygon/issuernode-arm:${{ env.IMAGE_TAG }} |