test pipeline #2188
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: Main | |
on: | |
push: | |
branches: | |
- "feature/**" | |
- "develop" | |
- "release/**" | |
jobs: | |
build: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
brand: ["payex", "swedbankpay"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get info | |
run: | | |
appid=$(echo ${{ secrets.AZURE_CREDENTIALS_STAGE }} | jq -r '.appId') | |
echo $appid | jq -r '.appId' | |
echo $appid | jq -r '.name' | |
# Set brand specific variables | |
- name: Environment variables | |
id: variables | |
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }} | |
- name: Set Node.js 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Install | |
run: npm ci | |
- name: Build | |
run: npm run ${{ steps.variables.outputs.BUILD_SCRIPT }} -- --env basename=${{ steps.variables.outputs.BRANCH }} --env semver=${{ steps.variables.outputs.BRANCH }} --env info_version=${{ steps.variables.outputs.VERSION }} --env github_actions=true | |
- name: Create latest version reference file | |
run: | | |
echo "{ \"latestVersion\" : \"${{ steps.variables.outputs.BRANCH }}\" }" > ./dist/latestVersion.json | |
- name: Azure Login | |
uses: azure/login@v1.4.7 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS_STAGE }} | |
- name: Azure Deploy | |
uses: azure/CLI@v1 | |
with: | |
azcliversion: 2.43.0 | |
inlineScript: | | |
az storage blob upload-batch -s dist -d \$web --account-name ${{ steps.variables.outputs.AZURE_ACCOUNT_STAGE }} --overwrite |