From 7c212f05ca34619bbcbfde10e4287ecc2017fce9 Mon Sep 17 00:00:00 2001 From: Ben Hale Date: Mon, 2 Nov 2020 05:36:36 -0800 Subject: [PATCH] Polishing Signed-off-by: Ben Hale --- .github/workflows/update-pipelines.yml | 78 -------------------------- 1 file changed, 78 deletions(-) delete mode 100644 .github/workflows/update-pipelines.yml diff --git a/.github/workflows/update-pipelines.yml b/.github/workflows/update-pipelines.yml deleted file mode 100644 index 5d7a9e4..0000000 --- a/.github/workflows/update-pipelines.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Update Pipelines -"on": - schedule: - - cron: 0 5 * * 1-5 - workflow_dispatch: {} -jobs: - update: - name: Update Pipelines - runs-on: - - ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: "1.15" - - name: Install octo - run: | - #!/usr/bin/env bash - - set -euo pipefail - - GO111MODULE=on go get -u -ldflags="-s -w" github.com/paketo-buildpacks/pipeline-builder/cmd/octo - - id: pipelines - name: Update Pipelines - run: | - #!/usr/bin/env bash - - set -euo pipefail - - if [[ -f .github/pipelines-version ]]; then - OLD_VERSION=$(cat .github/pipelines-version) - else - OLD_VERSION="0.0.0" - fi - - octo --descriptor "${DESCRIPTOR}" - - PAYLOAD=$(gh api /repos/paketo-buildpacks/pipeline-builder/releases/latest) - - NEW_VERSION=$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.name') - echo "${NEW_VERSION}" > .github/pipelines-version - - RELEASE_NOTES=$( - gh api \ - -F text="$(jq -n -r --argjson PAYLOAD "${PAYLOAD}" '$PAYLOAD.body')" \ - -F mode="gfm" \ - -F context="paketo-buildpacks/pipeline-builder" \ - -X POST /markdown - ) - - git add .github/ - git checkout -- . - - echo "::set-output name=old-version::${OLD_VERSION}" - echo "::set-output name=new-version::${NEW_VERSION}" - echo "::set-output name=release-notes::${RELEASE_NOTES//$'\n'/%0A}" - env: - DESCRIPTOR: .github/pipelines-descriptor.yml - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: peter-evans/create-pull-request@v3 - with: - body: |- - Bumps pipelines from `${{ steps.pipelines.outputs.old-version }}` to `${{ steps.pipelines.outputs.new-version }}`. - -
- Release Notes - ${{ steps.pipelines.outputs.release-notes }} -
- branch: update/pipelines - commit-message: |- - Bump pipelines from ${{ steps.pipelines.outputs.old-version }} to ${{ steps.pipelines.outputs.new-version }} - - Bumps pipelines from ${{ steps.pipelines.outputs.old-version }} to ${{ steps.pipelines.outputs.new-version }}. - delete-branch: true - labels: semver:patch, type:task - signoff: true - title: Bump pipelines from ${{ steps.pipelines.outputs.old-version }} to ${{ steps.pipelines.outputs.new-version }} - token: ${{ secrets.GITHUB_TOKEN }}