-
Notifications
You must be signed in to change notification settings - Fork 3
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 #3 from ForestEckhardt/update-buildpack
Updates buildpack
- Loading branch information
Showing
24 changed files
with
1,146 additions
and
259 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,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily |
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,27 @@ | ||
- name: status/possible-priority | ||
description: This issue is ready to work and should be considered as a potential priority | ||
color: F9D0C4 | ||
- name: status/prioritized | ||
description: This issue has been triaged and resolving it is a priority | ||
color: BFD4F2 | ||
- name: status/blocked | ||
description: This issue has been triaged and resolving it is blocked on some other issue | ||
color: 848978 | ||
- name: bug | ||
description: Something isn't working | ||
color: d73a4a | ||
- name: enhancement | ||
description: A new feature or request | ||
color: a2eeef | ||
- name: documentation | ||
description: This issue relates to writing documentation | ||
color: D4C5F9 | ||
- name: semver:major | ||
description: A change requiring a major version bump | ||
color: 6b230e | ||
- name: semver:minor | ||
description: A change requiring a minor version bump | ||
color: cc6749 | ||
- name: semver:patch | ||
description: A change requiring a patch version bump | ||
color: f9d0c4 |
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
name: Approve Bot PRs | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Test Pull Request"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
download: | ||
name: Download PR Artifact | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pr-author: ${{ steps.pr-data.outputs.author }} | ||
pr-number: ${{ steps.pr-data.outputs.number }} | ||
steps: | ||
- name: 'Download artifact' | ||
uses: paketo-buildpacks/github-config/actions/pull-request/download-artifact@main | ||
with: | ||
name: "event-payload" | ||
repo: ${{ github.repository }} | ||
run_id: ${{ github.event.workflow_run.id }} | ||
workspace: "/github/workspace" | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
- id: pr-data | ||
run: | | ||
echo "::set-output name=author::$(cat event.json | jq -r '.pull_request.user.login')" | ||
echo "::set-output name=number::$(cat event.json | jq -r '.pull_request.number')" | ||
approve: | ||
name: Approve Bot PRs | ||
needs: download | ||
if: ${{ needs.download.outputs.pr-author == 'paketo-bot' || needs.download.outputs.pr-author == 'dependabot[bot]' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Commit Verification | ||
id: unverified-commits | ||
uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
repo: ${{ github.repository }} | ||
number: ${{ needs.download.outputs.pr-number }} | ||
|
||
- name: Check for Human Commits | ||
id: human-commits | ||
uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
repo: ${{ github.repository }} | ||
number: ${{ needs.download.outputs.pr-number }} | ||
|
||
- name: Checkout | ||
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' | ||
uses: actions/checkout@v2 | ||
|
||
- name: Approve | ||
if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' | ||
uses: paketo-buildpacks/github-config/actions/pull-request/approve@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} | ||
number: ${{ needs.download.outputs.pr-number }} |
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,44 @@ | ||
name: Auto-Merge | ||
|
||
on: | ||
pull_request_review: | ||
types: | ||
- submitted | ||
|
||
jobs: | ||
automerge: | ||
name: Merge or Rebase | ||
if: ${{ github.event.review.user.login == 'paketo-bot-reviewer' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Fetch Pull Request Details | ||
id: pull_request | ||
env: | ||
NUMBER: ${{ github.event.pull_request.number }} | ||
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
run: | | ||
payload="$( | ||
curl "https://api.github.com/repos/${GITHUB_REPOSITORY}/pulls/${NUMBER}" \ | ||
--silent \ | ||
--location \ | ||
--header "Authorization: token ${GITHUB_TOKEN}" | ||
)" | ||
echo "::set-output name=mergeable_state::$(echo "${payload}" | jq -r -c .mergeable_state)" | ||
- name: Merge | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'clean' || steps.pull_request.outputs.mergeable_state == 'unstable' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/merge@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} | ||
|
||
- name: Rebase | ||
if: ${{ steps.pull_request.outputs.mergeable_state == 'behind' }} | ||
uses: paketo-buildpacks/github-config/actions/pull-request/rebase@main | ||
with: | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} |
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,35 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '0 0 * * *' # Once a day at midnight | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- 'go' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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,97 @@ | ||
name: Create or Update Draft Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
repository_dispatch: | ||
types: [ version-bump ] | ||
workflow_dispatch: {} | ||
|
||
concurrency: release | ||
|
||
jobs: | ||
unit: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16.x | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Run Unit Tests | ||
run: ./scripts/unit.sh | ||
|
||
integration: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
needs: unit | ||
steps: | ||
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16.x | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true | ||
- name: Run Integration Tests | ||
run: ./scripts/integration.sh --use-token | ||
env: | ||
GIT_TOKEN: ${{ github.token }} | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: integration | ||
steps: | ||
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.16.x | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true | ||
- name: Reset Draft Release | ||
id: reset | ||
uses: paketo-buildpacks/github-config/actions/release/reset-draft@main | ||
with: | ||
repo: ${{ github.repository }} | ||
token: ${{ github.token }} | ||
- name: Tag | ||
id: tag | ||
uses: paketo-buildpacks/github-config/actions/tag/increment-tag@main | ||
with: | ||
current_version: ${{ steps.reset.outputs.current_version }} | ||
- name: Package | ||
run: ./scripts/package.sh --version "${{ steps.tag.outputs.tag }}" | ||
- name: Create Release Notes | ||
id: create-release-notes | ||
uses: paketo-buildpacks/github-config/actions/release/notes@main | ||
with: | ||
repo: ${{ github.repository }} | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
- name: Create Release | ||
uses: paketo-buildpacks/github-config/actions/release/create@main | ||
with: | ||
repo: ${{ github.repository }} | ||
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | ||
tag_name: v${{ steps.tag.outputs.tag }} | ||
target_commitish: ${{ github.sha }} | ||
name: v${{ steps.tag.outputs.tag }} | ||
body: ${{ steps.create-release-notes.outputs.release_body }} | ||
draft: true | ||
assets: | | ||
[ | ||
{ | ||
"path": "build/buildpack.tgz", | ||
"name": "${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.tgz", | ||
"content_type": "application/gzip" | ||
}, | ||
{ | ||
"path": "build/buildpackage.cnb", | ||
"name": "${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.cnb", | ||
"content_type": "application/gzip" | ||
} | ||
] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.