Docker Image CI Prod #109
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: Docker Image CI Prod | |
# Build docker image on tags release and cron | |
on: | |
push: | |
tags: | |
- "*" | |
schedule: | |
# we build monthly at 00:00 on day-of-month 1 | |
#- cron: '0 0 1 * *' | |
# we build weekly at 00:00 on Sunday. | |
- cron: '0 0 * * 0' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
# https://github.com/docker/setup-qemu-action | |
- | |
name: 'Create env file' | |
run: | | |
touch .env.production.local | |
echo VITE_PGSAIL_URL=https://api.openplotter.cloud > .env.production.local | |
echo VITE_GRAFANA_URL=https://app.openplotter.cloud >> .env.production.local | |
echo VUE_APP_INCLUDE_DEMOS=false >> .env.production.local | |
echo VITE_APP_BUILD_VERSION=true >> .env.production.local | |
echo VITE_APP_TITLE=PostgSail >> .env.production.local | |
cat .env.production.local | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# https://github.com/marketplace/actions/docker-login | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASS }} | |
# https://github.com/marketplace/actions/build-and-push-docker-images | |
- | |
name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: xbgmsharp/postgsail-vuestic:latest |