Skip to content

fix: test api urls

fix: test api urls #29

Workflow file for this run

name: Deploy to TEST environment
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
jobs:
build-frontend:
name: Build and Push Frontend Docker Image
if: ${{ github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the updated source code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push it to the container registry
uses: docker/build-push-action@v4
with:
build-args: NG_CONFIGURATION=test
push: true
context: ./frontend
tags: "ghcr.io/bosancz/interni-sekce-frontend:test"
cache-from: type=gha
cache-to: type=gha,mode=max
build-backend:
name: Build and Push Backend Docker Image
if: ${{ github.event.pull_request.draft == false && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the updated source code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push it to the container registry
uses: docker/build-push-action@v4
with:
push: true
context: ./backend
tags: "ghcr.io/bosancz/interni-sekce-backend:test"
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
needs:
- build-backend
- build-frontend
runs-on: ubuntu-latest # Run the job on an Ubuntu runner
steps:
- name: Call Watchtower to Update Docker Image
run: |
curl -I --fail-with-body \
-H "Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}" \
${{ vars.WATCHTOWER_URL }}