Merge branch 'feature/update-action-to-use-docker-image' of https://github.com/PepperDash/PepperDashCore into feature/update-action-to-use-docker-image

This commit is contained in:
Neil Dorin
2020-03-17 21:12:14 -06:00

View File

@@ -58,7 +58,7 @@ jobs:
./.github/scripts/ZipBuildOutput.ps1 ./.github/scripts/ZipBuildOutput.ps1
- name: Write Version - name: Write Version
run: run:
Write-Output "VERSION = $($Env:VERSION), BRANCH = $($Env:GITHUB_REF)" | Out-File -FilePath ".\properties.txt" Write-Output "VERSION = $($Env:VERSION), BRANCH = $($Env:GITHUB_REF)" | Out-File -FilePath ".\version.txt"
- name: Upload Build Output - name: Upload Build Output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@@ -67,8 +67,8 @@ jobs:
- name: Upload Version.txt - name: Upload Version.txt
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: Properties name: Version
path: ./output/properties.txt path: ./output/version.txt
# - name: Create Release # - name: Create Release
# id: create_release # id: create_release
# uses: actions/create-release@v1 # uses: actions/create-release@v1
@@ -92,29 +92,42 @@ jobs:
needs: build_project needs: build_project
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- name: Download Build Propeties - name: Checkout Internal Builds Repo
uses: actions/checkout@v2
with:
token: ${{ secrets.BUILDS_TOKEN }}
repository: PepperDash-Engineering/pepperdash-core-builds
- name: Download Version Info
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: Properties name: Version
- name: Check Directory - name: Check Directory
run: Get-ChildItem "./" run: Get-ChildItem "./"
- name: Set Version Number - name: Set Version Number
shell: powershell shell: powershell
run: | run: |
Get-ChildItem "./Properties" Get-ChildItem "./Version"
Write-Host "Workflow Commit: ${{ env.GITHUB_SHA}}" $version = Get-Content -Path ./Version/version.txt
Write-Host "Workflow Branch: ${{ env.GITHUB_REF}}" Write-Host "Version: $version"
$properties = Get-Content -Path ./properties.txt Write-Output "::set-env name=VERSION::$version"
Write-Host $properties Remove-Item -Path ./Version/version.txt
$properties -match "VERSION = (?<version>.*),.*BRANCH = (?<build>.*)" Remove-Item -Path ./Version
$version = $matches['version'] - name: Create new branch
$branch = $matches['build'] run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/")
Write-Host "Version: $version" - name: Download Build output
Write-Host "Branch: $branch" uses: actions/download-artifact@v1
Write-Output "::set-env name=VERSION::$version" with:
Write-Output "::set-env name=BRANCH::$branch" name: Build
Remove-Item -Path ./Properties/Properties.txt path: ./
Remove-Item -Path ./Properties - name: Copy build output and push
run: |
git add .
git commit -m "Build ${{ env.GITHUB_RUN_NUMBER }} from commit: https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ env.GITHUB_SHA }}"
git tag ${{ env.VERSION }}
git push --set-upstream origin $($Env:GITHUB_REF -Replace "refs/heads/") --force
git push --tags origin
# "Build #${SOURCE_BUILD_NUMBER} from commit: https://github.com/PepperDash/PepperDashCore/commit/${COMMIT}"
- name: Check Directory - name: Check Directory
run: | run: |
Get-ChildItem "./" Get-ChildItem "./"
@@ -148,23 +161,23 @@ jobs:
# path: ./internal_builds_repo # path: ./internal_builds_repo
# repository: PepperDash-Engineering/pepperdash-core-builds # repository: PepperDash-Engineering/pepperdash-core-builds
# - name: Download Build output # - name: Download Build output
# uses: actions/download-artifact@v1 # uses: actions/download-artifact@v1
# with: # with:
# name: Build # name: Build
# path: ./build.zip # path: ./build.zip
# - name: Download Version Info # - name: Download Version Info
# uses: actions/download-artifact@v1 # uses: actions/download-artifact@v1
# with: # with:
# name: Version # name: Version
# - name: Check Directory # - name: Check Directory
# run: Get-ChildItem "./" # run: Get-ChildItem "./"
# - name: Set Version Number # - name: Set Version Number
# shell: powershell # shell: powershell
# run: | # run: |
# Get-ChildItem "./" # Get-ChildItem "./"
# $version = Get-Content -Path ./version.txt # $version = Get-Content -Path ./version.txt
# Write-Output "::set-env name=VERSION::$version" # Write-Output "::set-env name=VERSION::$version"
# Remove-Item -Path ./version.txt # Remove-Item -Path ./version.txt
# - name: Check Directory # - name: Check Directory
# run: | # run: |
# Get-ChildItem "./" # Get-ChildItem "./"