web: bump rollup from 2.79.1 to 2.79.2 in /web #826
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: PR checks | |
on: pull_request | |
env: | |
ACTIONS_RUNNER_DEBUG: false | |
SECRET_KEY: test | |
MONGO_DATABASE: cv_generator | |
MONGO_AUTH_USERNAME: test | |
MONGO_AUTH_PASSWORD: root_password | |
MONGO_HOSTNAME: jobhub_db | |
BACK_PORT: 8082 | |
JWT_SECRET: root_password | |
HUB_URL: http://localhost:8081 | |
WEB_URL: http://localhost:8080 | |
jobs: | |
push_to_registry: | |
name: Test and deploy jobhub | |
runs-on: ubuntu-latest | |
services: | |
jobhub_db: | |
image: mongo:latest | |
options: >- | |
--health-cmd "echo 'db.runCommand(\"ping\").ok' | mongosh jobhub_db:27017/cv_generator --quiet" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: ${{ env.MONGO_AUTH_USERNAME }} | |
MONGO_INITDB_ROOT_PASSWORD: ${{ env.MONGO_AUTH_PASSWORD }} | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Build image | |
run: docker build --tag jobhub . | |
- name: Test back | |
run: | | |
docker run --network host --name jobhub_app \ | |
-e MONGO_AUTH_USERNAME=${{ env.MONGO_AUTH_USERNAME }} \ | |
-e MONGO_AUTH_PASSWORD=${{ env.MONGO_AUTH_PASSWORD }} \ | |
-e MONGO_DATABASE=${{ env.MONGO_DATABASE }} \ | |
-e BACK_PORT=${{ env.BACK_PORT }} \ | |
-e HUB_URL=${{ env.HUB_URL }} \ | |
-e WEB_URL=${{ env.WEB_URL }} \ | |
-e GITHUB_ACTIONS=true -d jobhub | |
docker ps | |
curl --head --fail --retry-delay 5 --retry 3 --retry-connrefused http://localhost:8082/api | |
- name: Test hub | |
run: | | |
docker exec jobhub_app sh -c "service nginx start" | |
curl --head --fail --retry-delay 5 --retry 3 --retry-connrefused http://localhost:8081 | |
- name: Test web | |
run: | | |
curl --head --fail --retry-delay 5 --retry 3 --retry-connrefused http://localhost | |
- name: Tag image | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
run: | | |
docker commit jobhub & | |
docker tag jobhub carloswufei/jobhub | |
- name: Push to Docker Hub | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
uses: elgohr/Publish-Docker-Github-Action@master | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
name: carloswufei/jobhub | |
tags: "latest" |