-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2021 from OctopusDeploy/sf/check-for-secret-befor…
…e-build Conditionally run deploy steps only if an Octopus URL is present
- Loading branch information
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
env: | ||
SHOULD_DEPLOY: ${{ secrets.OCTOPUSSERVERURL != '' }} | ||
OCTOPUS_URL: ${{ secrets.OCTOPUSSERVERURL }} | ||
OCTOPUS_API_KEY: ${{ secrets.OCTOPUSSERVERAPIKEY }} | ||
OCTOPUS_SPACE: "DevOps Microsite" | ||
|
@@ -88,26 +89,30 @@ jobs: | |
- name: Push a package to Octopus Deploy 🐙 | ||
uses: OctopusDeploy/[email protected] | ||
if: ${{ env.SHOULD_DEPLOY }} | ||
with: | ||
packages: ${{ steps.package.outputs.package_file_path }} | ||
|
||
- name: Push build information to Octopus Deploy 🐙 | ||
uses: OctopusDeploy/push-build-information-action@v3 | ||
if: ${{ env.SHOULD_DEPLOY }} | ||
with: | ||
version: "${{ env.PACKAGE_VERSION }}" | ||
packages: "Docs Microsite" | ||
|
||
- name: Create a release in Octopus Deploy 🐙 | ||
uses: OctopusDeploy/create-release-action@v3 | ||
id: "create_release" | ||
uses: OctopusDeploy/create-release-action@v3 | ||
if: ${{ env.SHOULD_DEPLOY }} | ||
with: | ||
project: "Docs Microsite" | ||
package_version: "${{ env.PACKAGE_VERSION }}" | ||
git_ref: ${{ github.ref }} | ||
|
||
- name: Deploy the release in Octopus Deploy 🐙 | ||
uses: OctopusDeploy/deploy-release-action@v3 | ||
id: "queue_deployments" | ||
uses: OctopusDeploy/deploy-release-action@v3 | ||
if: ${{ env.SHOULD_DEPLOY }} | ||
with: | ||
project: "Docs Microsite" | ||
release_number: ${{ steps.create_release.outputs.release_number }} | ||
|