Fixed buypass certificate issuing error (#447) #68
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: Publish | |
on: | |
push: | |
tags: [ v* ] | |
env: | |
DOTNET_VERSION: 6.0.x | |
BICEP_VERSION: 0.25.53 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.setup_version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Use .NET Core ${{ 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 Functions | |
run: dotnet publish -c Release -r win-x86 --self-contained false -o ./dist -p:Version=${{ steps.setup_version.outputs.version }} AppService.Acmebot | |
- name: Zip Functions | |
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@v2 | |
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 appservice-acmebot -n v4/latest.zip --overwrite | |
az storage blob upload --auth-mode login -f latest.zip --account-name stacmebotprod -c appservice-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/appservice-acmebot:v4 --force | |
az bicep publish --file azuredeploy.bicep --target br:cracmebotprod.azurecr.io/bicep/modules/appservice-acmebot:v${{ needs.publish.outputs.version }} --force |