Bind CSRFProtect to Flask app to activate CSRF protection #87
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 publish Docker image | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build_and_push_to_registry: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v3.3.0 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v1.2.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2.4.1 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2.1.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| id: docker_build | |
| uses: docker/build-push-action@v4.0.0 | |
| with: | |
| push: true | |
| tags: jgbustos/ml-rest-api:latest | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build.outputs.digest }} |