generated from moja-global/Import-Me
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub workflow to push images to Azure Container Registry (#138)
* CI/CD: Azure Container Workflow * chore: update the workflow
- Loading branch information
1 parent
d461ec6
commit 3a6e812
Showing
2 changed files
with
48 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,44 @@ | ||
name: Deploy to Azure Container Registry | ||
|
||
on: [push] | ||
|
||
env: | ||
REGISTRY: mojaglobal.azurecr.io | ||
|
||
jobs: | ||
deploy-rest-api-flint-example: | ||
name: Build and push REST API FLINT Example to ACR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: 'Login via Azure CLI' | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
- name: 'Build and push image' | ||
uses: azure/docker-login@v1 | ||
with: | ||
login-server: ${{ env.REGISTRY }} | ||
username: ${{ secrets.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
- name: Extract Docker metadata | ||
id: meta | ||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 | ||
with: | ||
images: ${{ env.REGISTRY }}/moja-global/rest_api_flint_example | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc | ||
with: | ||
context: ./local/rest_api_flint.example/ | ||
file: "./local/rest_api_flint.example/Dockerfile" | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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,4 @@ | ||
{ | ||
"makefile.extensionOutputFolder": "./.vscode", | ||
"esbonio.sphinx.confDir": "" | ||
} |