Skip to content

Fixed Buypass Go SSL issuing error (#672) #87

Fixed Buypass Go SSL issuing error (#672)

Fixed Buypass Go SSL issuing error (#672) #87

Workflow file for this run

name: Publish
on:
push:
tags: [ v* ]
env:
DOTNET_VERSION: 6.0.x
BICEP_VERSION: 0.22.6
jobs:
publish:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.setup_version.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Use .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Version
id: setup_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
- name: Publish Function app
run: dotnet publish -c Release -r win-x86 --no-self-contained -o ./dist -p:Version=${{ steps.setup_version.outputs.version }} KeyVault.Acmebot
- name: Zip Function app
run: 7z a -mx=9 latest.zip ./dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
latest.zip
azuredeploy.bicep
deploy:
environment: production
needs: publish
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Use Bicep ${{ env.BICEP_VERSION }}
run: |
az config set bicep.use_binary_from_path=false
az bicep install --version v${{ env.BICEP_VERSION }}
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
- name: Upload to Blob
run: |
az storage blob upload --auth-mode login -f latest.zip --account-name stacmebotprod -c keyvault-acmebot -n v4/latest.zip --overwrite
az storage blob upload --auth-mode login -f latest.zip --account-name stacmebotprod -c keyvault-acmebot -n v4/${{ needs.publish.outputs.version }}.zip --overwrite
- name: Publish to Private Registry
run: |
az bicep publish --file azuredeploy.bicep --target br:cracmebotprod.azurecr.io/bicep/modules/keyvault-acmebot:v4 --force
az bicep publish --file azuredeploy.bicep --target br:cracmebotprod.azurecr.io/bicep/modules/keyvault-acmebot:v${{ needs.publish.outputs.version }} --force