Skip to content

HAI-1917 Fix problem where form is not saved after filling contact in… #892

HAI-1917 Fix problem where form is not saved after filling contact in…

HAI-1917 Fix problem where form is not saved after filling contact in… #892

Workflow file for this run

name: ui-dev
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'
- run: yarn --frozen-lockfile
- run: yarn lint
- run: yarn test
- run: yarn build
- run: yarn type-check
- name: Tar build files
run: tar -cvf build.tar build
- name: Upload application build files for Docker build job
uses: actions/upload-artifact@v2
with:
name: haitaton-ui-build
path: build.tar
retention-days: 1
# Temporarily disabled to validate Helsinki-profiili functionality
# in development environment
# e2e:
# name: E2E tests
# needs: build
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout backend
# uses: actions/checkout@v2
# with:
# repository: City-of-Helsinki/haitaton-backend
# ref: dev
# path: ./haitaton-backend
# - name: Checkout frontend
# uses: actions/checkout@v2
# with:
# repository: City-of-Helsinki/haitaton-ui
# path: ./haitaton-ui
# - name: Run Docker Compose
# run: docker-compose --env-file haitaton-backend/.env.local -f haitaton-backend/docker-compose-e2e.yml up -d
# - name: Wait until auth-service is up
# uses: nev7n/wait_for_response@v1
# with:
# url: 'http://localhost:3030/'
# responseCode: 200
# timeout: 300000
# interval: 500
# - name: Change haitaton-ui owner
# run: sudo chown -R $USER ./haitaton-ui
# - name: Change node_modules owner
# working-directory: ./haitaton-ui
# run: sudo chown -R $USER ./node_modules
# - name: Use Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '14.x'
# - name: Cypress run
# uses: cypress-io/github-action@v2
# with:
# working-directory: haitaton-ui
# wait-on: 'http://localhost:3001'
docker_build_and_push:
name: Push Docker image to GitHub Packages
needs: [build]
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Download application build files
uses: actions/download-artifact@v2
with:
name: haitaton-ui-build
- name: Untar build files
run: tar -xvf build.tar
- name: List files after checkout
shell: bash
run: |
ls -ltra
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to OpenShift Container Registry
uses: docker/login-action@v1
with:
registry: registry.redhat.io
username: ${{ secrets.RHSA_USERNAME }}
password: ${{ secrets.RHSA_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CR_OWNER }}
password: ${{ secrets.CR_PAT }}
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/city-of-helsinki/haitaton/ui:latest
ghcr.io/city-of-helsinki/haitaton/ui:dev