-
Notifications
You must be signed in to change notification settings - Fork 7
113 lines (106 loc) · 5.06 KB
/
register-buildpack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Register Buildpack
"on":
issues:
types:
- opened
jobs:
add:
if: ${{ startsWith(github.event.issue.title, 'ADD') }}
runs-on: ubuntu-latest
steps:
- uses: docker://ghcr.io/buildpacks/actions/registry/compute-metadata:5.7.3
id: metadata
with:
issue: ${{ toJSON(github.event.issue) }}
- uses: docker://ghcr.io/buildpacks/actions/registry/verify-namespace-owner:5.7.3
id: verify-namespace-owner
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
owner: ${{ secrets.NAMESPACES_OWNER }}
repository: ${{ secrets.NAMESPACES_REPOSITORY }}
namespace: ${{ steps.metadata.outputs.namespace }}
user: ${{ toJSON(github.event.issue.user) }}
add-if-missing: true
- uses: docker://ghcr.io/buildpacks/actions/buildpackage/verify-metadata:5.7.3
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
id: ${{ steps.metadata.outputs.id }}
version: ${{ steps.metadata.outputs.version }}
address: ${{ steps.metadata.outputs.address }}
- uses: docker://ghcr.io/buildpacks/actions/registry/add-entry:5.7.3
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
owner: ${{ secrets.INDEX_OWNER }}
repository: ${{ secrets.INDEX_REPOSITORY }}
namespace: ${{ steps.metadata.outputs.namespace }}
name: ${{ steps.metadata.outputs.name }}
version: ${{ steps.metadata.outputs.version }}
address: ${{ steps.metadata.outputs.address }}
- uses: andymckay/labeler@1.0.2
with:
repo-token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
add-labels: succeeded
- uses: peter-evans/close-issue@v1.0.3
with:
comment: |
✅ Successfully added buildpack. For more details, see the [action log][action-uri].
[action-uri]: https://github.com/${{ secrets.INDEX_OWNER }}/${{ secrets.INDEX_REPOSITORY }}/actions/runs/${{ github.run_id }}
- uses: andymckay/labeler@1.0.2
if: ${{ failure() }}
with:
repo-token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
add-labels: failed
- uses: peter-evans/close-issue@v1
if: ${{ failure() }}
with:
comment: |
🔴 Failed to add buildpack. For more details, see the [action log][action-uri].
🔃 If you feel this was in error, you may try again by creating a new issue.
📬 If the problem persists or need assistance, you may comment on this issue or contact the maintainers via email at `cncf-buildpacks-maintainers@lists.cncf.io`.
[action-uri]: https://github.com/${{ secrets.INDEX_OWNER }}/${{ secrets.INDEX_REPOSITORY }}/actions/runs/${{ github.run_id }}
yank:
if: ${{ startsWith(github.event.issue.title, 'YANK') }}
runs-on: ubuntu-latest
steps:
- uses: docker://ghcr.io/buildpacks/actions/registry/compute-metadata:5.7.3
id: metadata
with:
issue: ${{ toJSON(github.event.issue) }}
- uses: docker://ghcr.io/buildpacks/actions/registry/verify-namespace-owner:5.7.3
id: verify-namespace-owner
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
owner: ${{ secrets.NAMESPACES_OWNER }}
repository: ${{ secrets.NAMESPACES_REPOSITORY }}
namespace: ${{ steps.metadata.outputs.namespace }}
user: ${{ toJSON(github.event.issue.user) }}
- uses: docker://ghcr.io/buildpacks/actions/registry/yank-entry:5.7.3
with:
token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
owner: ${{ secrets.INDEX_OWNER }}
repository: ${{ secrets.INDEX_REPOSITORY }}
namespace: ${{ steps.metadata.outputs.namespace }}
name: ${{ steps.metadata.outputs.name }}
version: ${{ steps.metadata.outputs.version }}
- uses: andymckay/labeler@1.0.2
with:
repo-token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
add-labels: succeeded
- uses: peter-evans/close-issue@v1.0.3
with:
comment: |
✅ Successfully yanked buildpack. For more details, see the [action log][action-uri].
[action-uri]: https://github.com/${{ secrets.INDEX_OWNER }}/${{ secrets.INDEX_REPOSITORY }}/actions/runs/${{ github.run_id }}
- uses: andymckay/labeler@1.0.2
if: ${{ failure() }}
with:
repo-token: ${{ secrets.DISTRIBUTION_GITHUB_TOKEN }}
add-labels: failed
- uses: peter-evans/close-issue@v1.0.3
if: ${{ failure() }}
with:
comment: |
🔴 Failed to yank buildpack. For more details, see the [action log][action-uri].
🔃 If you feel this was in error, you may try again by creating a new issue.
📬 If the problem persists or need assistance, you may comment on this issue or contact the maintainers via email at `cncf-buildpacks-maintainers@lists.cncf.io`.
[action-uri]: https://github.com/${{ secrets.INDEX_OWNER }}/${{ secrets.INDEX_REPOSITORY }}/actions/runs/${{ github.run_id }}