Feature(ISS91): Connector version control #55
Workflow file for this run
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: Deploy Front | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["dev"] | |
tags: ["v*"] | |
paths: | |
- src/Web/WebAngular/** | |
- .github/workflows/deploy-front.yml | |
pull_request: | |
branches: ["dev"] | |
paths: | |
- src/Web/WebAngular/** | |
- .github/workflows/deploy-front.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: "src/Web/WebAngular" | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Docker Login | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v1.10.0 | |
with: | |
username: ${{ secrets.REGISTRY_LOGIN }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Set image tags | |
if: github.event_name != 'pull_request' | |
id: tag | |
run: | | |
if [ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]; then | |
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" | |
else | |
echo "::set-output name=tag::dev" | |
fi | |
- name: Build and push Docker images (DEV) | |
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/dev') | |
uses: docker/build-push-action@v2.7.0 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: jpcarpanezi/houston-front:dev | |
file: src/Web/WebAngular/Dockerfile | |
context: ./src/Web/WebAngular | |
- name: Build and push Docker images (TAGS) | |
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') | |
uses: docker/build-push-action@v2.7.0 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: | | |
jpcarpanezi/houston-front:${{ steps.tag.outputs.tag }} | |
jpcarpanezi/houston-front:latest | |
file: src/Web/WebAngular/Dockerfile | |
context: ./src/Web/WebAngular |