Merge pull request #13 from paulasuarezp/devFront #3
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: CI for TFG | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
release: | |
types: [published] | |
jobs: | |
# unit-tests: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# with: | |
# fetch-depth: 0 | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: 20 | |
# - run: npm --prefix webapp ci | |
# - run: npm --prefix restapi ci | |
# - run: npm --prefix webapp test --coverage --watchAll | |
# - run: npm --prefix restapi test --coverage --watchAll | |
# - name: Analyze with SonarCloud | |
# uses: sonarsource/sonarcloud-github-action@master | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
docker-push-webapp: | |
name: Push webapp Docker Image to GitHub Packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Publish to Registry | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: TFG/webapp | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_PUSH_TOKEN }} | |
registry: ghcr.io | |
workdir: webapp | |
buildargs: API_URI | |
docker-push-restapi: | |
name: Push restapi Docker Image to GitHub Packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Publish to Registry | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: TFG/restapi | |
username: ${{ github.actor }} | |
password: ${{ secrets.DOCKER_PUSH_TOKEN }} | |
registry: ghcr.io | |
workdir: restapi | |
buildargs: SSL_CERT,SSL_PRIVKEY |