From 10a1d86bdbc7aa5e4960a7c164337efe76b45043 Mon Sep 17 00:00:00 2001 From: smirko-dev <64351017+smirko-dev@users.noreply.github.com> Date: Mon, 7 Dec 2020 10:21:38 +0100 Subject: [PATCH] Upload artifacts * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Update FitbitBuild.yml * Create Post.yml * Update FitbitBuild.yml * Update Post.yml * Update Post.yml * Update Post.yml * Update FitbitBuild.yml --- .github/workflows/FitbitBuild.yml | 7 ++++++ .github/workflows/Post.yml | 38 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/Post.yml diff --git a/.github/workflows/FitbitBuild.yml b/.github/workflows/FitbitBuild.yml index 5e0fcb3..a79029f 100644 --- a/.github/workflows/FitbitBuild.yml +++ b/.github/workflows/FitbitBuild.yml @@ -32,3 +32,10 @@ jobs: - name: Run Build run: npx fitbit-build --if-present + + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: ${{ success() }} + with: + path: build/app.fba + if-no-files-found: error diff --git a/.github/workflows/Post.yml b/.github/workflows/Post.yml new file mode 100644 index 0000000..0cf8dd2 --- /dev/null +++ b/.github/workflows/Post.yml @@ -0,0 +1,38 @@ + +name: Post + +on: + workflow_run: + workflows: ["FitbitBuild"] + branches: [main] + types: + - completed + +jobs: + post: + name: Post info + runs-on: ubuntu-latest + needs: build + steps: + - name: Get workflow info + shell: bash + run: | + curl -sL -X GET "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts" + +# - name: Install CML +# run: npm i -g @dvcorg/cml + +# - name: Post comment +# shell: bash +# env: +# repo_token: ${{ secrets.GITHUB_TOKEN }} +# run: | +# echo -e "Build successful" >> report.md +# cml-send-comment report.md + +# run: | +# jq -nc '{"body": "test comment"}' | \ +# curl -sL -X POST -d @- \ +# -H "Content-Type: application/json" \ +# -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ +# "https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/comments"