Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates github-config #5

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/.patch_files
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.github/.patch_files
.github/labels.yml
.github/CODEOWNERS
.github/workflows
.github/workflows/approve-bot-pr.yml
.github/workflows/codeql-analysis.yml
.github/workflows/lint.yml
.github/workflows/update-github-config.yml
.github/workflows/create-draft-release.yml
.github/workflows/test-pull-request.yml
.github/workflows/lint-yaml.yml
.github/workflows/synchronize-labels.yml
.github/workflows/label-pr.yml
.github/.syncignore
.github/dependabot.yml
.gitignore
LICENSE
NOTICE
README.md
11 changes: 7 additions & 4 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
- name: documentation
description: This issue relates to writing documentation
color: D4C5F9
- name: help wanted
description: Extra attention is needed
color: 008672
- name: semver:major
description: A change requiring a major version bump
color: 6b230e
Expand All @@ -31,9 +34,9 @@
- name: "failure:release"
description: An issue filed automatically when a release workflow run fails
color: f00a0a
- name: "failure:push"
description: An issue filed automatically when a push buildpackage workflow run fails
- name: "failure:update-github-config"
description: An issue filed automatically when a github config update workflow run fails
color: f00a0a
- name: "failure/update-dependencies"
description: An issue filed automatically when updating buildpack.toml dependencies fails in a workflow
- name: "failure:approve-bot-pr"
description: An issue filed automatically when a PR auto-approve workflow run fails
color: f00a0a
19 changes: 19 additions & 0 deletions .github/workflows/approve-bot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,22 @@ jobs:
gh pr merge ${{ needs.download.outputs.pr-number }} --auto --rebase
env:
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}

failure:
name: Alert on Failure
runs-on: ubuntu-22.04
needs: [download, approve]
if: ${{ always() && needs.download.result == 'failure' || needs.approve.result == 'failure' }}
steps:
- name: File Failure Alert Issue
uses: paketo-buildpacks/github-config/actions/issue/file@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
label: "failure:approve-bot-pr"
comment_if_exists: true
issue_title: "Failure: Approve bot PR workflow"
issue_body: |
Approve bot PR workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
comment_body: |
Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
8 changes: 6 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches:
- main
- v*
pull_request:
branches: [ main ]
branches:
- main
- v*
schedule:
- cron: '0 0 * * *' # Once a day at midnight

Expand Down
29 changes: 3 additions & 26 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- v*
repository_dispatch:
types: [ version-bump ]
workflow_dispatch:
Expand All @@ -18,13 +19,11 @@ jobs:
unit:
name: Unit Tests
runs-on: ubuntu-22.04
outputs:
builders: ${{ steps.builders.outputs.builders }}
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.19.x
- name: Checkout
uses: actions/checkout@v3
- name: Run Unit Tests
Expand All @@ -38,7 +37,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.19.x
- name: Checkout
uses: actions/checkout@v3
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
Expand All @@ -64,14 +63,6 @@ jobs:
tag="${{ steps.semver.outputs.tag }}"
fi
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
- 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:
Expand All @@ -80,21 +71,7 @@ jobs:
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"
}
]

failure:
name: Alert on Failure
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/go-get-update.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request_target:
branches:
- main
- v*
types:
- synchronize
- opened
Expand All @@ -18,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check Minimal Semver Labels
uses: mheap/github-action-required-labels@v1
uses: mheap/github-action-required-labels@v3
with:
count: 1
labels: semver:major, semver:minor, semver:patch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-yaml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
path: github-config

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- v*
pull_request:
branches:
- main
- v*

jobs:
golangci:
Expand All @@ -16,13 +18,13 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.19.x

- name: Checkout
uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
version: latest
args: --timeout 3m0s
94 changes: 0 additions & 94 deletions .github/workflows/push-buildpackage.yml

This file was deleted.

35 changes: 19 additions & 16 deletions .github/workflows/synchronize-labels.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: Synchronize Labels
"on":
push:
branches:
- main
paths:
- .github/labels.yml
workflow_dispatch: {}

on:
push:
branches:
- main
- v*
paths:
- .github/labels.yml
workflow_dispatch: {}

jobs:
synchronize:
name: Synchronize Labels
runs-on:
- ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ github.token }}
synchronize:
name: Synchronize Labels
runs-on:
- ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ github.token }}
Loading