add docs #24
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 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - 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: Login to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| doug2901/pycrud:${{ steps.bump.outputs.new_tag }} | |
| doug2901/pycrud:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Configure Git for Helm | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| - name: Run chart-releaser | |
| uses: helm/chart-releaser-action@v1.6.0 | |
| env: | |
| CR_TOKEN: "${{ secrets.GH_TOKEN }}" |