Skip to content

iniziato ProposalPdf #853

iniziato ProposalPdf

iniziato ProposalPdf #853

Workflow file for this run

name: build docker image
on: push
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build client webpack
run: |
cd frontend/
npm ci
npm run js
- name: prepare server
run: |
cd api/
npm ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: harbor.cs.dm.unipi.it/caps/caps
tags: api
- name: Login to harbor
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: harbor.cs.dm.unipi.it
username: ${{ secrets.HARBOR_CAPS_ROBOT }}
password: ${{ secrets.HARBOR_CAPS_SECRET }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
push: true
cache-from: type=registry,ref=harbor.cs.dm.unipi.it/caps/caps:api
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Trigger update on Watchtower
if: ${{ github.event_name != 'pull_request' }}
run: |
curl -H "Authorization: Bearer ${{ secrets.WATCHTOWER_DELTA_TOKEN }}" https://watchtower.delta.cs.dm.unipi.it/v1/update