solved issue where home wasn't being linked by icon on mobile and cal… #104
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
#git add . && git commit -m "updates" && git push && git tag -f staging-1.0.0 && git push origin -f staging-1.0.1 | |
name: Build + Push Frontend | |
on: | |
push: | |
tags: | |
- 'staging-*' | |
- 'production-*' | |
jobs: | |
build: | |
outputs: | |
ENVIRONMENT: ${{ steps.extract_environment.outputs.ENVIRONMENT }} | |
name: Build frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Extract environment from tag | |
id: extract_environment | |
run: | | |
ENVIRONMENT=$(echo "${{ github.ref_name }}" | sed 's/-.*//') | |
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV | |
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_OUTPUT | |
- name: Load proper env from secret | |
run: | | |
if [ "${{ env.ENVIRONMENT }}" = "staging" ]; then | |
echo "${{ secrets.STAGING_ENV }}" | base64 --decode > $(pwd)/.env | |
echo "BUILD_NUMBER=${{ github.ref_name }}" >> $(pwd)/.env | |
echo "" >> $(pwd)/.env | |
fi | |
if [ "${{ env.ENVIRONMENT }}" = "production" ]; then | |
echo "${{ secrets.PRODUCTION_ENV }}" | base64 --decode > $(pwd)/.env | |
echo "BUILD_NUMBER=${{ github.ref_name }}" >> $(pwd)/.env | |
echo "" >> $(pwd)/.env | |
fi | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker build | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: openq/openq-frontend:${{ github.ref_name }} | |
build-args: | | |
"deploy_env=${{ env.ENVIRONMENT }}" | |
tagHelm: | |
needs: build | |
uses: OpenQDev/OpenQ-Workflows/.github/workflows/tag.yml@main | |
with: | |
APP: frontend | |
VERSION: ${{ github.ref_name }} | |
ENVIRONMENT: ${{ needs.build.outputs.ENVIRONMENT }} | |
secrets: | |
PAT: ${{ secrets.PAT }} |