Skip to content

Commit

Permalink
Adds deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kimpepper committed Sep 20, 2023
1 parent 63a0bf7 commit b73de0f
Showing 1 changed file with 36 additions and 11 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ name: deploy
on:
workflow_call:
inputs:
skpr_env:
default: dev
env:
type: environment
required: true
description: The Skpr environment to deploy to.
package:
default: true
type: boolean
description: Whether this deployment needs to be packaged.
version:
type: string
description: The environment to deploy to.
description: The version to deploy
secrets:
skpr_username:
required: true
Expand All @@ -18,32 +25,50 @@ env:
SKPR_PASSWORD: ${{ secrets.skpr_password }}

jobs:
deploy:
info:
runs-on: ubuntu-latest
environment:
name: ${{ inputs.skpr_env }}
concurrency: ${{ inputs.env }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Skpr Setup
uses: skpr/action-setup@v1
- name: Skpr Info
id: skpr-info
uses: skpr/action-info@v1
with:
env: ${{ inputs.skpr_env }}
env: ${{ inputs.env }}
outputs:
url: ${{ steps.skpr-info.outputs.url }}

deploy:
runs-on: ubuntu-latest
needs: [ info ]
environment:
name: ${{ inputs.env }}
url: ${{ needs.info.outputs.url }}
concurrency: ${{ inputs.env }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Get version
if:
- name: Skpr Setup
uses: skpr/action-setup@v1
- name: Skpr Package
if: inputs.package
uses: skpr/action-package@v1
with:
version: ${{ steps.skpr-info.outputs.version }}
version:
- name: Skpr Deploy
uses: skpr/action-deploy@v1
with:
version: ${{ steps.skpr-info.outputs.version }}
env: ${{ inputs.skpr_env }}
env: ${{ inputs.env }}
- name: Run Skpr Post-deploy Command
uses: skpr/action-exec@v1
with:
Expand Down

0 comments on commit b73de0f

Please sign in to comment.