diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index fecd4a1..e800a2f 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -3,13 +3,13 @@ name: CI on: push: branches-ignore: - - 'dependabot/**' + - "dependabot/**" pull_request: - types: [opened, synchronize, reopened, ready_for_review] + paths-ignore: + - "README.md" jobs: unit-test: - runs-on: ubuntu-latest strategy: @@ -29,17 +29,6 @@ jobs: with: flags: unitests - # visual-test: - # runs-on: ubuntu-latest - # if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'project-openubl' }} - # steps: - # - uses: actions/checkout@v1 - # - run: yarn install - # - uses: chromaui/action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - e2e: runs-on: ${{ matrix.os }} strategy: @@ -66,7 +55,7 @@ jobs: env: POSTGRES_USER: user POSTGRES_PASSWORD: password - POSTGRES_DB: xsender_db + POSTGRES_DB: ublhub_db options: >- --health-cmd pg_isready --health-interval 10s @@ -79,7 +68,7 @@ jobs: env: QUARKUS_DATASOURCE_USERNAME: user QUARKUS_DATASOURCE_PASSWORD: password - QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://backend-db:5432/xsender_db + QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://backend-db:5432/ublhub_db QUARKUS_OIDC_AUTH_SERVER_URL: http://keycloak:8080/auth/realms/openubl QUARKUS_OIDC_CLIENT_ID: xsender QUARKUS_OIDC_CREDENTIALS_SECRET: secret @@ -114,7 +103,7 @@ jobs: record: ${{ env.CYPRESS_RECORD_KEY != null }} tag: ${{ steps.define_tags.outputs.value }} start: yarn run xsender:ui - wait-on: 'http://localhost:3000' + wait-on: "http://localhost:3000" wait-on-timeout: 120 config: pageLoadTimeout=100000 browser: ${{ matrix.browser }} @@ -134,45 +123,3 @@ jobs: - uses: codecov/codecov-action@v2.0.3 with: flags: e2etests - - container-images: - if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'project-openubl' }} - runs-on: ubuntu-latest - needs: [unit-test, visual-test, e2e] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v2.4.0 - with: - node-version: 12.x - - run: yarn install - - run: yarn build - - name: Push to GitHub Packages - uses: elgohr/Publish-Docker-Github-Action@master - with: - registry: docker.pkg.github.com - name: project-openubl/ublhub-ui/ublhub-ui - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - dockerfile: Dockerfile - snapshot: false - tags: "master" - - name: Push to Docker Hub - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: projectopenubl/ublhub-ui - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: Dockerfile - snapshot: false - tags: "master" - - name: Push to Quay.io - uses: elgohr/Publish-Docker-Github-Action@master - with: - registry: quay.io - name: projectopenubl/ublhub-ui - username: ${{ secrets.QUAYIO_USERNAME }} - password: ${{ secrets.QUAYIO_PASSWORD }} - dockerfile: Dockerfile - snapshot: false - tags: "master" diff --git a/.github/workflows/container-images.yml b/.github/workflows/container-images.yml new file mode 100644 index 0000000..486641d --- /dev/null +++ b/.github/workflows/container-images.yml @@ -0,0 +1,54 @@ +name: Container images generator + +on: + push: + branches-ignore: + - "dependabot/**" + +jobs: + container-images: + if: ${{ github.repository_owner == 'project-openubl' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2.4.0 + with: + node-version: 12.x + - name: Build + run: | + yarn install + yarn build + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: Push to GitHub Packages + uses: elgohr/Publish-Docker-Github-Action@master + with: + registry: docker.pkg.github.com + name: project-openubl/ublhub-ui/ublhub-ui + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + dockerfile: Dockerfile + snapshot: false + tags: ${{ steps.extract_branch.outputs.branch }} + - name: Push to Docker Hub + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: projectopenubl/ublhub-ui + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + dockerfile: Dockerfile + snapshot: false + tags: ${{ steps.extract_branch.outputs.branch }} + - name: Push to Quay.io + uses: elgohr/Publish-Docker-Github-Action@master + with: + registry: quay.io + name: projectopenubl/ublhub-ui + username: ${{ secrets.QUAYIO_USERNAME }} + password: ${{ secrets.QUAYIO_PASSWORD }} + dockerfile: Dockerfile + snapshot: false + tags: ${{ steps.extract_branch.outputs.branch }}