Skip to content

Commit

Permalink
publish to Azure Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame authored Nov 11, 2023
1 parent d638b54 commit 5ac69a9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
choose-registry:
runs-on: ubuntu-latest
env:
dockerhub: true
azure: false
dockerhub: false
azureregistry: true
outputs:
dockerhub: ${{ steps.choose.outputs.dockerhub }}
azureregistry: ${{ steps.choose.outputs.azureregistry }}
Expand Down Expand Up @@ -94,13 +94,25 @@
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker push ${{ secrets.DOCKER_USERNAME }}/az-appservice-go
- name: Log in to Azure registry
if: needs.choose-registry.outputs.azureregistry
uses: docker/login-action@v2
with:
registry: https://akvtraining.azurecr.io/
username: ${{ secrets.AZURE_REGISTRY_USER }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Publish to Azure Registry
if: needs.choose-registry.outputs.azureregistry
run: docker push akvtraining.azurecr.io/az-appservice-go

deplpoy-to-azure-from-dockerhub:
if: needs.choose-registry.outputs.dockerhub
needs: [publish-to-registry, choose-registry]
runs-on: ubuntu-latest

steps:
- name: Deploy to Azure Web App from docker hub
- name: Deploy az-appservice-go-dockerhub

uses: azure/webapps-deploy@v2
with:
Expand Down

0 comments on commit 5ac69a9

Please sign in to comment.