diff --git a/.github/workflows/main_3tee.yml b/.github/workflows/main_3tee.yml index d47ef7b..1c4a783 100644 --- a/.github/workflows/main_3tee.yml +++ b/.github/workflows/main_3tee.yml @@ -11,41 +11,41 @@ on: jobs: build: - runs-on: 'ubuntu-latest' + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - - name: Log in to registry - uses: docker/login-action@v2 - with: - registry: https://nhuttu.azurecr.io/ - username: ${{ secrets.AzureAppService_ContainerUsername_ec143f4c1c1341d9b7ed9f4d03b7576e }} - password: ${{ secrets.AzureAppService_ContainerPassword_e2e30df56695481091b1d101c74cc631 }} + - name: Log in to registry + uses: docker/login-action@v2 + with: + registry: https://nhuttu.azurecr.io/ + username: ${{ secrets.ACR_USERNAME }} + password: ${{ secrets.ACR_PASSWORD}} - - name: Build and push container image to registry - uses: docker/build-push-action@v3 - with: - push: true - tags: nhuttu.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_ec143f4c1c1341d9b7ed9f4d03b7576e }}/webimage:${{ github.sha }} - file: ./Dockerfile + - name: Build and push container image to registry + uses: docker/build-push-action@v3 + with: + push: true + tags: nhuttu.azurecr.io/${{ secrets.ACR_USERNAME }}/webimage:${{ github.sha }} + file: ./Dockerfile deploy: runs-on: ubuntu-latest needs: build environment: - name: 'production' + name: "production" url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} steps: - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: '3tee' - slot-name: 'production' - publish-profile: ${{ secrets.AzureAppService_PublishProfile_c210f6050fd843ef9e2f56cd720db044 }} - images: 'nhuttu.azurecr.io/${{ secrets.AzureAppService_ContainerUsername_ec143f4c1c1341d9b7ed9f4d03b7576e }}/webimage:${{ github.sha }}' \ No newline at end of file + - name: Deploy to Azure Web App + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: "3tee" + slot-name: "production" + publish-profile: ${{ secrets.ACR_PUBLISHPROFILE }} + images: "nhuttu.azurecr.io/${{ secrets.ACR_USERNAME }}/webimage:${{ github.sha }}" diff --git a/.github/workflows/main_eeeq.yml b/.github/workflows/main_eeeq.yml deleted file mode 100644 index 658871e..0000000 --- a/.github/workflows/main_eeeq.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# More GitHub Actions for Azure: https://github.com/Azure/actions - -name: Build and deploy container app to Azure Web App - eeeq - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: "ubuntu-latest" - - steps: - - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Log in to registry - uses: docker/login-action@v2 - with: - registry: https://mcr.microsoft.com/ - username: ${{ secrets.ACR_USERNAME }} - password: ${{ secrets.ACR_PASSWORD }} - - - name: Build and push container image to registry - uses: docker/build-push-action@v3 - with: - push: true - tags: mcr.microsoft.com/${{ secrets.ACR_USERNAME }}/appsvc/staticsite:${{ github.sha }} - file: ./Dockerfile - secrets: AZURE_CONNECTION_STRING=${{secrets.AZURE_CONNECTION_STRING}} - NEXT_PUBLIC_TESTATAAN="HEI KAIKKI AZURESSA!" - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: "production" - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: "eeeq" - slot-name: "production" - publish-profile: ${{ secrets.AZURE_PUBLISHPROFILE }} - images: "mcr.microsoft.com/${{ secrets.ACR_USERNAME }}/appsvc/staticsite:${{ github.sha }}"