remove rollback #12
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: Pipeline | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| # paths: | |
| # - '**/*.tf' | |
| jobs: | |
| Build_image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Bump version and push tag | |
| id: bump | |
| uses: anothrNick/github-tag-action@1.73.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| WITH_V: true | |
| - name: Versão criada | |
| run: | | |
| echo "Tag criada: ${{ steps.bump.outputs.new_tag }}" | |
| - name: Set version in app.py | |
| run: sed -i "s/GH_BUILD_VERSION/${{ steps.bump.outputs.new_tag }}/g" app.py | |
| - name: cat app.py | |
| run: cat app.py | grep "${{ steps.bump.outputs.new_tag }}" | |
| - name: docker build | |
| run: docker build -t doug2901/pycrud:${{ steps.bump.outputs.new_tag }} . | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: docker push | |
| run: docker push doug2901/pycrud:${{ steps.bump.outputs.new_tag }} | |
| - name: push to latest | |
| run: | | |
| docker tag doug2901/pycrud:${{ steps.bump.outputs.new_tag }} doug2901/pycrud:latest && docker push doug2901/pycrud:latest |