Use neon.tech Serverless Postgres #263
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: ci | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
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: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Install npm dependencies | |
run: npm ci | |
- | |
name: cds build | |
run: npm run build | |
- | |
name: build db | |
run: ./pg-build.sh | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
platforms: | |
linux/amd64 | |
tags: | |
gregorwolf/pg-beershop:latest | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} | |
- | |
name: Build and push db deployer | |
id: docker_build_db | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: db-deployer-kubernetes/Dockerfile | |
push: true | |
tags: | |
gregorwolf/pg-beershop-db:latest | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build_db.outputs.digest }} | |
- | |
name: Build and push UI | |
id: docker_build_ui | |
uses: docker/build-push-action@v3 | |
with: | |
context: app | |
push: true | |
tags: | |
gregorwolf/pg-beershop-ui:latest | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build_ui.outputs.digest }} | |
## Not possible until https://github.com/docker/hub-tool/issues/172 is solved | |
# - | |
# name: Publish Readme | |
# id: publish_readme | |
# uses: meeDamian/[email protected] | |
# with: | |
# user: ${{ secrets.DOCKERHUB_USERNAME }} | |
# pass: ${{ secrets.DOCKERHUB_TOKEN }} | |
# slug: gregorwolf/pg-beershop | |
# readme: ./docker/description.md | |
# description: CAP Beershop using PostgreSQL for persistence |