Deploy Docker #2513
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
name: Deploy Docker | |
on: | |
schedule: | |
- cron: '0 0/6 * * *' | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- 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: "Set up JDK 17" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: "Install Node and Yarn" | |
run: | | |
./mvnw --batch-mode -e --no-transfer-progress --fail-fast compile -P install-yarn -Dmaven.test.skip | |
- name: "Copy static" | |
run: | | |
./mvnw --batch-mode -e --no-transfer-progress --fail-fast prepare-package -Pbuild-public | |
- name: "Build" | |
run: | | |
./mvnw --batch-mode -e --no-transfer-progress --fail-fast package -Dmaven.test.skip | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push docker | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
file: Dockerfile | |
tags: apache/dubbo-initializer:dev | |
platforms: linux/amd64 |