Deploy v 1.0.0 without gzipping. #175
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: Build code with Maven for pull requests to develop | |
on: | |
pull_request_target: | |
repository: dqops/dqo | |
branches: | |
- develop | |
push: | |
repository: dqops/dqo | |
branches: | |
- develop | |
jobs: | |
build-docker-develop: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Restore cached npm packages | |
id: restore-cached-npm-packages | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
dqops/src/main/frontend/node | |
dqops/src/main/frontend/node_modules | |
key: 'npm' | |
- name: Build with Maven | |
run: mvn package -DskipTests -Pbuild-with-jdk-11 -Pdevelopment-build -Prun-npm | |
- uses: juliangruber/read-file-action@v1 | |
name: Read VERSION | |
id: read_version | |
with: | |
path: ./VERSION | |
- uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: ${{ secrets.RELEASES_SERVICE_ACCOUNT_JSON }} | |
- id: 'upload-release-asia' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-asia/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-australia-southeast1' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-australia-southeast1/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-eu' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-eu/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-europe-central2' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-europe-central2/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-in' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-in/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-me-central1' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-me-central1/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-me-west1' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-me-west1/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-southamerica-east1' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-southamerica-east1/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- id: 'upload-release-us' | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
with: | |
path: './distribution/target/dqo-distribution-${{steps.read_version.outputs.content}}-bin.zip' | |
destination: '${{ secrets.DQOPS_COM_WWW_BUCKET_PREFIX }}-us/releases' | |
gzip: false | |
headers: |- | |
content-type: application/zip | |
- name: Save cached npm packages | |
id: save-cached-npm-packages | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
dqops/src/main/frontend/node | |
dqops/src/main/frontend/node_modules | |
key: 'npm' | |
- uses: docker-practice/actions-setup-docker@master | |
- uses: mr-smithers-excellent/docker-build-push@v6 | |
name: Build and Push Docker Image | |
with: | |
image: dqops/dqo | |
tags: ${SHORT_SHA},develop | |
dockerfile: Dockerfile-fast | |
enableBuildKit: true | |
multiPlatform: true | |
platform: linux/amd64,linux/arm64 | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} |