Postseason status boolean #22
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
name: CI/CD Pipeline to Azure Web App | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
env: | |
DB: ${{secrets.DB}} | |
CS: ${{secrets.CS}} | |
SFAKEY: ${{secrets.SFAKEY}} | |
SFAUSER: ${{secrets.SFA}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "^1.20" | |
- name: Build | |
run: | | |
go build -v ./... | |
- name: Log in to Docker Registry | |
run: echo ${{ secrets.DOCKER_P }} | docker login simfba.azurecr.io --username ${{ secrets.DOCKER_U }} --password-stdin | |
- name: Build Docker Image | |
run: docker build -t simfba.azurecr.io/simfba:${{ github.sha }} . | |
- name: Push Docker Image | |
run: docker push simfba.azurecr.io/simfba:${{ github.sha }} | |
- name: Deploy to Azure Web App | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: "simfba" | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
images: "simfba.azurecr.io/simfba:${{ github.sha }}" |