-
Notifications
You must be signed in to change notification settings - Fork 12
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 #17 from medyagh/az_blob
upload PR binaries to azure
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
on: | ||
pull_request: | ||
paths: | ||
- "**.go" | ||
- "**.yml" | ||
push: | ||
branches: | ||
- master | ||
name: Build PR | ||
jobs: | ||
build: | ||
name: Build binaries | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
- name: Fetch Git Tags | ||
run: | | ||
git fetch --prune --unshallow --tags | ||
- name: Get SHORT SHA | ||
id: shortsha | ||
run: | | ||
echo "::set-output name=sha8::$(echo ${{github.event.pull_request.head.sha}} | cut -c1-8)" | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.14.6' | ||
stable: true | ||
id: go | ||
- name: install rice | ||
run: | | ||
go get github.com/GeertJohan/go.rice | ||
go get github.com/GeertJohan/go.rice/rice | ||
- name: Cross Platform Build | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
make cross | ||
- name: Test | ||
run: | | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
make test | ||
- uses: LanceMcCarthy/[email protected] | ||
name: Uploading to Azure storage... | ||
with: | ||
connection_string: ${{ secrets.az_connection_string }} | ||
container_name: gopogh | ||
source_folder: ./out | ||
destination_folder: ${{github.event.number}}/${{ steps.shortsha.outputs.sha8 }} | ||
clean_destination_folder: true | ||
fail_if_source_empty: true | ||
- name: Report url | ||
shell: bash | ||
run: | | ||
echo "*******************************************************" | ||
echo "https://gopogh.blob.core.windows.net/gopogh/${{github.event.number}}/${{ steps.shortsha.outputs.sha8 }}/output.html" | ||
echo "https://gopogh.blob.core.windows.net/gopogh/${{github.event.number}}/${{ steps.shortsha.outputs.sha8 }}/output.html" | ||
echo "*******************************************************" | ||
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
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