Skip to content

Commit

Permalink
Fix update deployment GitHub Action (#609)
Browse files Browse the repository at this point in the history
* Fix update deployment GitHub Action

Apparently _some_ variables require the syntax in the `if:` bit, though it's not exactly clear which.

* Ok, somehow it only works from env, not secrets
  • Loading branch information
BrunoBernardino committed Oct 5, 2022
1 parent 17bbd55 commit 5f1264a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,13 @@ jobs:
runs-on: ubuntu-latest
env:
PL_VENDOR_VERSION: ${{ github.event.inputs.vendor_version || '0.0.1' }}
DOCS_GITHUB_REPO: ${{ secrets.DOCS_GITHUB_REPO }}
steps:
- name: Call the GitHub Action to update docs
if: github.event.inputs.environment == 'Production' && secrets.DOCS_GITHUB_REPO
if: github.event.inputs.environment == 'Production' && ${{ env.DOCS_GITHUB_REPO }}
run: |
curl --request POST \
--url https://api.github.com/repos/${{ secrets.DOCS_GITHUB_REPO }}/actions/workflows/update-downloads-urls.yml/dispatches \
--url https://api.github.com/repos/${{ env.DOCS_GITHUB_REPO }}/actions/workflows/update-downloads-urls.yml/dispatches \
--header 'Authorization: Basic ${{ secrets.DEVOPS_BASIC_AUTH_TOKEN }}' \
--header 'Content-Type: application/json' \
--data '{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/update-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
instance: ["test", "beta"]
env:
DEPLOY_INSTANCE: ${{ matrix.instance }}
DEVOPS_GITHUB_REPO: ${{ secrets.DEVOPS_GITHUB_REPO }}
steps:
- name: Trigger GH Action
if: secrets.DEVOPS_GITHUB_REPO
if: ${{ env.DEVOPS_GITHUB_REPO }}
run: |
curl --request POST \
--url https://api.github.com/repos/${{ secrets.DEVOPS_GITHUB_REPO }}/actions/workflows/update-deployment.yml/dispatches \
--url https://api.github.com/repos/${{ env.DEVOPS_GITHUB_REPO }}/actions/workflows/update-deployment.yml/dispatches \
--header 'Authorization: Basic ${{ secrets.DEVOPS_BASIC_AUTH_TOKEN }}' \
--header 'Content-Type: application/json' \
--data '{
Expand Down

0 comments on commit 5f1264a

Please sign in to comment.