Last active
December 20, 2024 17:42
-
-
Save oismaelash/9a39db840039ed0cdc99e4c0a236eb15 to your computer and use it in GitHub Desktop.
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: Build and Push to ACR | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| env: | |
| LOGIN_SERVER: ${{ secrets.LOGIN_SERVER }} | |
| REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} | |
| REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | |
| TAG: latest | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: azure/docker-login@v2 | |
| with: | |
| login-server: ${{ env.LOGIN_SERVER }} | |
| username: ${{ env.REGISTRY_USERNAME }} | |
| password: ${{ env.REGISTRY_PASSWORD }} | |
| - run: | | |
| docker build . -t ${{ env.LOGIN_SERVER }}/<PROJECT_NAME>:${{ env.TAG }} | |
| docker push ${{ env.LOGIN_SERVER }}/<PROJECT_NAME>:${{ env.TAG }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment