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: Publish Function App .NET container image to GitHub | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/Azure.AISearch.FunctionApp.DotNet/**' | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| build: | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Log in to registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: https://index.docker.io/v1/ | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_TOKEN }} | |
| - name: Build and push agent-service container image to registry | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: ./src/Azure.AISearch.FunctionApp.DotNet | |
| push: true | |
| tags: index.docker.io/${{ secrets.DOCKER_USERNAME }}/azure-aisearch-functionapp-dotnet:latest | |
| file: ./src/Azure.AISearch.FunctionApp.DotNet/Dockerfile | |
| build-args: | | |
| app_version=1.0.${{ github.run_number }} | |
| source_version=${{ github.sha }} |