Skip to content

Merge pull request #273 from ymaheshwari1/feat/release-label-workflow #7

Merge pull request #273 from ymaheshwari1/feat/release-label-workflow

Merge pull request #273 from ymaheshwari1/feat/release-label-workflow #7

on:
workflow_call:
inputs:
config-path:
required: true
type: string
secrets:
envPAT:
required: true
HOTWAX_PUBLIC_SECRET:
required: true
VUE_APP_FIREBASE_CONFIG:
required: false
VUE_APP_FIREBASE_VAPID_KEY:
required: false
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Checkout to latest release tag
run: |
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
- name: Install Dependencies
run: npm install
- name: Generate .env file
run: cp .env.example .env
- name: Set Firebase and VAPID Config
run: |
if [[ -n "$VUE_APP_FIREBASE_CONFIG" ]]; then
sed -i "s|VUE_APP_FIREBASE_CONFIG=.*|VUE_APP_FIREBASE_CONFIG=$VUE_APP_FIREBASE_CONFIG|g" .env
sed -i "s|VUE_APP_FIREBASE_VAPID_KEY=.*|VUE_APP_FIREBASE_VAPID_KEY='$VUE_APP_FIREBASE_VAPID_KEY'|g" .env
sed -i "s|const firebaseConfig =.*|const firebaseConfig = $VUE_APP_FIREBASE_CONFIG|g" public/firebase-messaging-sw.js
fi
env:
VUE_APP_FIREBASE_CONFIG: ${{ secrets.VUE_APP_FIREBASE_CONFIG }}
VUE_APP_FIREBASE_VAPID_KEY: ${{ secrets.VUE_APP_FIREBASE_VAPID_KEY }}
- name: Build
run: npm run build
- name: Install Firebase
run: npm install -g firebase-tools
- name: Set Firebase project
run: firebase use default --token "$HOTWAX_PUBLIC_SECRET"
env:
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
- name: Deploy
run: firebase deploy --token "$HOTWAX_PUBLIC_SECRET" -m "Deploying via GitHub actions" --only hosting:uat
env:
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}

Check failure on line 53 in .github/workflows/common-firebase-hosting-release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/common-firebase-hosting-release.yml

Invalid workflow file

You have an error in your yaml syntax on line 53
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Fetch release tag"
run: |
echo "LABEL=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
- name: "Create label"
run: gh label create "release-${{ env.LABEL }}" --color FF7F7E