name: Deploy to production on: release: types: [published] jobs: build-and-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build backend id: build-backend uses: redhat-actions/buildah-build@v2 with: image: ohtuilmo-backend tags: production ${{ github.sha }} context: backend/ containerfiles: | backend/Dockerfile build-args: NODE_ENV="production" - name: Build frontend id: build-frontend uses: redhat-actions/buildah-build@v2 with: image: ohtuilmo-frontend tags: production ${{ github.sha }} context: frontend/ containerfiles: | frontend/Dockerfile build-args: NODE_ENV="production" - name: Push backend to registry.version.helsinki.fi uses: redhat-actions/push-to-registry@v2 with: image: ${{ steps.build-backend.outputs.image }} tags: ${{ steps.build-backend.outputs.tags }} registry: registry.version.helsinki.fi/toska/openshift/kontit/ username: kontit password: ${{ secrets.VERSION_PUSH_SECRET }} - name: Push frontend to registry.version.helsinki.fi uses: redhat-actions/push-to-registry@v2 with: image: ${{ steps.build-frontend.outputs.image }} tags: ${{ steps.build-frontend.outputs.tags }} registry: registry.version.helsinki.fi/toska/openshift/kontit/ username: kontit password: ${{ secrets.VERSION_PUSH_SECRET }}