diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 448d8ff..7bdac48 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,6 +99,10 @@ jobs: push: ${{ github.event_name != 'pull_request' || github.event.inputs.push == 'true' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + outputs: + tags: "${{ steps.tags.outputs.result }}" + # - name: Docker Hub Description # if: github.event_name != 'pull_request' || github.event.inputs.push == 'true' @@ -122,10 +126,13 @@ jobs: - uses: actions/checkout@v3 if: github.ref == 'refs/heads/master' + - name: Get result + run: echo "${{ needs.Build.outputs.tags }}" + - name: Update versions if: startsWith(github.ref, 'refs/tags/') run: | - TAG="${{ steps.tags.outputs.result }}" + TAG="${{ needs.Build.outputs.tags }}" CURRENT_VERSION=$(grep "appVersion: " helm/easyhaproxy/Chart.yaml | sed 's#appVersion: "\(.*\)"#\1#g') if [ "$TAG" = "$CURRENT_VERSION" ]; then @@ -145,9 +152,9 @@ jobs: sed -i "s#chart: easyhaproxy-[a-zA-Z0-9\.]*#chart: easyhaproxy-$NEW_VERSION#g" deploy/kubernetes/easyhaproxy-*.yml git add . - git commit -m "[skip ci] Update from $CURRENT_VERSION to $TAG" git config --global user.name "$GITHUB_ACTOR CI/CD" git config --global user.email "info@byjg.com.br" + git commit -m "[skip ci] Update from $CURRENT_VERSION to $TAG" git push fi