Release - deploy artifact #10
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
name: Release - deploy artifact | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: Tag from where the artifact is going to be downloaded and used as base for the deploy | |
type: string | |
required: true | |
environment: | |
description: Environment that is going to be used | |
type: string | |
required: true | |
# Jobs to be executed | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
container: tnascimento013/latam_salesforcedx_industries_orgdevmodebuilds:latest | |
environment: ${{ inputs.environment }} | |
steps: | |
- name: Installing missing CLIs / Plugins | |
run: echo "y" | sf plugins install sf-orgdevmode-builds | |
- name: Download Artifact | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | |
version: tags/${{ inputs.tag }} | |
file: ${{ github.event.repository.name }}-${{ inputs.tag }}.zip | |
- name: Unzip artifact | |
run: unzip ${{ github.event.repository.name }}-${{ inputs.tag }}.zip -d outputdir/ | |
- name: Extracting private key | |
working-directory: ./outputdir/ | |
run: 'echo "${{ secrets.JWT_KEY_NONPROD }}" > server.key' | |
- name: Running the build & deploy | |
working-directory: ./outputdir/ | |
run: sf builds deploy --buildfile manifest/buildfile.json --client-id ${{ vars.CLIENT_ID }} --instance-url ${{ vars.INSTANCE_URL }} --username ${{ vars.USERNAME }} --jwt-key-file server.key |