Skip to content

Commit

Permalink
DVO-4934 create source folder for compile only run
Browse files Browse the repository at this point in the history
  • Loading branch information
maa37 authored Jun 27, 2024
1 parent 8944dc6 commit 839ac3f
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,26 +192,23 @@ runs:
path: .\aws

- name: Update install script with branch name
if: ${{ inputs.custom_access_token != '' }}
id: aws-work
run: |
$deploy_folder = "${{ steps.app.outputs.deploy_folder }}"
$branch = "${{ steps.extract_branch.outputs.CLEAN_BRANCH }}"
$aws_token = "${{ inputs.custom_access_token }}"
$work_dir = "C:\actions-runner\_work\PatriotSoftware\PatriotSoftware\aws\deploy\$deploy_folder\deploy"
echo "Update install script with branch name"
mkdir $work_dir\wwwroot
if ( $branch -ne "master" ) {
echo "Update dev_folder_name value on install script"
if ( $branch -ne "master" -And $aws_token -ne '') {
echo "Update dev_folder_name value on install script with branch name"
(Get-Content $work_dir\install_script.ps1).Replace('dev_folder_name = "master"', 'dev_folder_name = "${{ steps.extract_branch.outputs.CLEAN_BRANCH }}"') | Set-Content $work_dir\install_script.ps1
}
"work_dir=$work_dir" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
shell: powershell

- name: Copy Compiled Folder(s)
if: ${{ inputs.custom_access_token != '' }}
run: |
$source = "${{ steps.monolith.outputs.source }}"
$compiled_folder = "${{ steps.app.outputs.compiled_folder }}"
Expand Down Expand Up @@ -245,18 +242,9 @@ runs:
$filename = "${{ steps.filename.outputs.name }}"
$s3_bucket = "${{ inputs.s3_bucket }}"
$deploy_folder = "${{ steps.app.outputs.deploy_folder }}"
$aws_token = "${{ inputs.custom_access_token }}"
$root = "C:\actions-runner\_work\PatriotSoftware\PatriotSoftware\"
if ( $aws_token -ne '' ) {
$path = $root + "aws\deploy\$deploy_folder"
}
else {
$path = $root + "artifacts\PublishedWebsites"
}
$compress = @{
Path = "$path\*"
Path = "C:\actions-runner\_work\PatriotSoftware\PatriotSoftware\aws\deploy\$deploy_folder\*"
CompressionLevel = "Fastest"
DestinationPath = "C:\artifacts\work.zip"
}
Expand Down

0 comments on commit 839ac3f

Please sign in to comment.