Skip to content

Commit

Permalink
fix: add condition to run a few steps
Browse files Browse the repository at this point in the history
  • Loading branch information
dati18 committed Aug 21, 2024
1 parent e51bbd8 commit 8b3411b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,19 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Check out `wmde/wbaas-deploy` repository in staging child directory
if: github.event_name != 'pull_request'
uses: actions/[email protected]
with:
repository: wmde/wbaas-deploy
path: ./repos/wbaas-deploy-staging
- name: Check out `wmde/wbaas-deploy` repository in production child directory
if: github.event_name != 'pull_request'
uses: actions/[email protected]
with:
repository: wmde/wbaas-deploy
path: ./repos/wbaas-deploy-production
- name: Update helmfile values for local, staging and production
if: github.event_name != 'pull_request'
id: update-helmfile-values
run: |
TAG="$(echo ${{ steps.docker_meta.outputs.tags }} | cut -d':' -f2)"
Expand All @@ -80,12 +83,14 @@ jobs:
cd ../wbaas-deploy-production
./bin/generate-values production ui
- name: Truncate commit message
if: github.event_name != 'pull_request'
id: truncate-commit-message
run: |
MSG=$(git log -1 --pretty=format:%s)
echo "msg=$MSG" >> $GITHUB_OUTPUT
- name: Create Staging+Local Pull Request
uses: peter-evans/create-pull-request@v5
if: github.event_name != 'pull_request'
with:
path: ./repos/wbaas-deploy-staging
commit-message: 'Staging+Local: Deploy new UI image ${{ steps.docker_meta.outputs.tags }}'
Expand All @@ -101,6 +106,7 @@ jobs:
**Changes**: [${{ steps.truncate-commit-message.outputs.msg }}](https://github.com/wbstack/ui/commit/${{ github.sha }})
- name: Create Production Pull Request
uses: peter-evans/create-pull-request@v5
if: github.event_name != 'pull_request'
with:
path: ./repos/wbaas-deploy-production
commit-message: 'Production: Deploy new UI image ${{ steps.docker_meta.outputs.tags }}'
Expand Down

0 comments on commit 8b3411b

Please sign in to comment.