diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de06bc8..9b0099f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,26 +18,3 @@ jobs: args: bin/deployment-create-status bin/deployment-get-id - name: Docker build run: docker build -t actions-github-deployment-status . - - gh-tagged-release: - name: Tagged release - needs: test - runs-on: ubuntu-latest - - steps: - - name: Checkout source code - uses: actions/checkout@v2 - - - name: Check Tag - id: check-tag - run: | - if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo ::set-output name=match::true - fi - - - name: Create Release - uses: "marvinpinto/action-automatic-releases@v0.3.0" - if: steps.check-tag.outputs.match == 'true' - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml deleted file mode 100644 index f314443..0000000 --- a/.github/workflows/versioning.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Keep the versions up-to-date - -on: - release: - types: [published] - -jobs: - actions-tagger: - runs-on: windows-latest - steps: - - uses: Actions-R-Us/actions-tagger@latest - with: - publish_latest: true - env: - GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' diff --git a/bin/deployment-create-status b/bin/deployment-create-status index 652373b..ec9da93 100755 --- a/bin/deployment-create-status +++ b/bin/deployment-create-status @@ -11,25 +11,19 @@ set -e BASEDIR=$(dirname "$0") DEPLOYMENT_ID=$("${BASEDIR}"/deployment-get-id) +GITHUB_WORKFLOW_URL=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID DEPLOY_STATE=$(echo "${1}"|tr "[:upper:]" "[:lower:]") DEPLOY_DESC="${2}" -if [ "$DEPLOY_STATE" = "cancelled" ]; then - DEPLOY_STATE="inactive" - ACCEPT_HEADER="application/vnd.github.ant-man-preview+json" -else - ACCEPT_HEADER="application/vnd.github.flash-preview+json" -fi - -ACCEPT_HEADER="application/vnd.github.flash-preview+json" +ACCEPT_HEADER="application/vnd.github.ant-man-preview+json,application/vnd.github.flash-preview+json" [ -n "${DEPLOY_DESC}" ] || DEPLOY_DESC="Deploying from GitHub Actions" echo "Setting status to ${DEPLOY_STATE} for deployment-id '${DEPLOYMENT_ID}'" wget -O-- \ - --post-data "{\"state\":\"${DEPLOY_STATE}\", \"target_url\":\"https://github.com/${GITHUB_REPOSITORY}/actions\", \"description\":\"${DEPLOY_DESC}\"}" \ + --post-data "{\"state\":\"${DEPLOY_STATE}\", \"target_url\":\"https://github.com/${GITHUB_REPOSITORY}/actions\", \"description\":\"${DEPLOY_DESC}\", \"log_url\":\"${GITHUB_WORKFLOW_URL}\"}" \ --header "Authorization: token ${INPUT_GITHUB_TOKEN}" \ --header "Content-Type: text/json; charset=utf-8" \ --header "Accept: ${ACCEPT_HEADER}" \