More adjusts on github actions
This commit is contained in:
parent
21a6fcc3d2
commit
b76daa32f1
1 changed files with 9 additions and 2 deletions
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
|
|
@ -100,6 +100,10 @@ jobs:
|
|||
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'
|
||||
# run: |
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue