-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Avaiga/bot/docker-github-action-production
Update the Docker GitHub Actions workflow file for production.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file was automatically generated. | ||
# Please, do not edit it manually. | ||
|
||
name: Build Docker Image production | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
environment: production | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 'Az CLI 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: 'Login to ACR' | ||
run: | | ||
az acr login --name ${{ vars.DOCKER_REGISTRY }} | ||
- name: 'Build & push image' | ||
run: | | ||
docker build -t ${{ vars.DOCKER_REGISTRY }}/chatbot:production . | ||
docker push ${{ vars.DOCKER_REGISTRY }}/chatbot:production |