From 01681cf194f6f4f3fe0e4d7cdab71e6f28547c9b Mon Sep 17 00:00:00 2001 From: Eduardo Vozniak Date: Mon, 2 Oct 2023 14:31:05 -0300 Subject: [PATCH] Moving bump version to local code --- .github/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3359854..e6e050a6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -83,10 +83,39 @@ jobs: push: false tags: docker.eu1.hsdp.io/reporting:${{ github.run_id }} - - name: Bump Version - id: bump-version - uses: ./.github/actions/bump-version + Bump-version: + runs-on: ubuntu-22.04 + name: Publish to docker repository + needs: [Build] + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Bump version + id: bump-version + shell: bash + run: | + pip3 install --root-user-action=ignore --upgrade bumpversion + sudo apt-get update && sudo apt-get install -y xmlstarlet --no-install-recommends + bumpversion patch + version=`cat VERSION` + echo "VERSION=$version" >> "$GITHUB_ENV" + echo "VERSION=$version" >> "$GITHUB_OUTPUT" + + - name: Commit + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + add: .bumpversion.cfg VERSION + message: "[no ci] Bump version." + + Publish: + runs-on: ubuntu-22.04 + name: Publish to docker repository + needs: [Bump-version] + steps: - name: Docker login run: | docker login --username '${{ secrets.DOCKER_USER }}' --password '${{ secrets.DOCKER_PSWD }}' '${{ secrets.DOCKER_REPO }}' @@ -96,4 +125,4 @@ jobs: with: context: ${{ github.workspace }} push: true - tags: docker.eu1.hsdp.io/reporting:${{ steps.bump-version.outputs.version }} + tags: docker.eu1.hsdp.io/reporting:${{ needs.Bump-version.outputs }}