1.1.5 - Updated mudblazor 9.3, refactoring #83
This file contains hidden or 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: Hedin UI Demo Site | |
| permissions: | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| docker_build_push_acr: | |
| name: 'Docker Build and Push to ACR' | |
| runs-on: ubuntu-latest | |
| environment: dev | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: AutoModality/action-clean@v1 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: hedin-ui-admin | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.x' | |
| - name: Az CLI login | |
| uses: azure/login@v1 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.OPERATIONS_HUB_CORE_PROD_AZURE_SUBSCRIPTION_ID }} | |
| - uses: benjlevesque/short-sha@v2.2 | |
| id: short-sha | |
| with: | |
| length: 7 | |
| - run: echo $SHA | |
| env: | |
| SHA: ${{ steps.short-sha.outputs.sha }} | |
| - name: Build and push | |
| run: | | |
| az acr login --name hedinit | |
| cd hedin-ui-admin/src/Hedin.UI.Demo/ | |
| dotnet publish . --os linux --arch x64 /t:PublishContainer -c Release -p ContainerImageTags='main-${{ env.SHA }}' -p ContainerRegistryImageName='hedinit.azurecr.io/ims/hedin-ui-admin-demo' | |
| deploy_to_dev: | |
| name: 'Deploy to dev' | |
| runs-on: ubuntu-latest | |
| needs: docker_build_push_acr | |
| environment: dev | |
| defaults: | |
| run: | |
| shell: bash | |
| ##needs: docker_build_push_acr | |
| steps: | |
| - id: generate-tag | |
| uses: hedinbil/hedin-github-actions-public/generate-tag@main | |
| with: | |
| team: ims | |
| component: hedin-ui | |
| - name: Construct commit URL | |
| run: echo "COMMIT_URL=https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" >> $GITHUB_ENV | |
| - id: deploy | |
| uses: hedinbil/hedin-github-actions-public/gitops-deploy-via-script@main | |
| with: | |
| team: ims | |
| component: hedin-ui | |
| environment: dev | |
| full-image-name: ${{ steps.generate-tag.outputs.full-image-name }} | |
| image-tag: ${{ steps.generate-tag.outputs.tag }} | |
| git-user-email: 'automation@hedinit.io' | |
| git-user-name: 'GitHub Actions - Hedin Ui Demo' | |
| pat-token: ${{ secrets.HEDIN_APPLICATIONS_STATE_PAT }} | |
| github-actor: ${{ github.actor }} | |
| github-commit-url: ${{ env.COMMIT_URL }} |