Skip to content

Commit c9fda94

Browse files
committedJan 29, 2025·
refactor: linting
Signed-off-by: Goetz Goerisch <g.goerisch@vdw.de>
1 parent 5dbee8b commit c9fda94

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed
 

‎.github/workflows/Dockerbuild.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
name: Build Docker image
2+
name: Build container image
33

44
on:
55
schedule:
6-
- cron: '23 9 * * *'
6+
- cron: "23 9 * * *"
77
push:
88
branches: [develop]
99
pull_request:
+34-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
---
2-
name: Clean up container images
3-
on:
4-
workflow_dispatch:
5-
schedule:
6-
# * is a special character in YAML so you have to quote this string
7-
- cron: '0 0 1 * *'
8-
9-
permissions:
10-
contents: read
11-
packages: write
12-
13-
jobs:
14-
build:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/github-script@v7.0.1
19-
env:
20-
PACKAGE_NAME: sample-server-asyncio
21-
PER_PAGE: 100
22-
with:
23-
github-token: ${{ secrets.DELETE_PACKAGES_TOKEN }}
24-
# yamllint disable rule:line-length
25-
script: |
26-
const response = await github.request("GET /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
27-
{ per_page: ${{ env.PER_PAGE }}
28-
});
29-
for(version of response.data) {
30-
if (version.metadata.container.tags.length == 0) {
31-
console.log("delete " + version.id)
32-
const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
33-
console.log("status " + deleteResponse.status)
34-
}
2+
name: Clean up container images
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# * is a special character in YAML so you have to quote this string
7+
- cron: "0 0 1 * *"
8+
9+
permissions:
10+
contents: read
11+
packages: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
- uses: actions/github-script@v7.0.1
19+
env:
20+
PACKAGE_NAME: sample-server-asyncio
21+
PER_PAGE: 100
22+
with:
23+
github-token: ${{ secrets.DELETE_PACKAGES_TOKEN }}
24+
# yamllint disable rule:line-length
25+
script: |
26+
const response = await github.request("GET /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
27+
{ per_page: ${{ env.PER_PAGE }}
28+
});
29+
for(version of response.data) {
30+
if (version.metadata.container.tags.length == 0) {
31+
console.log("delete " + version.id)
32+
const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
33+
console.log("status " + deleteResponse.status)
3534
}
36-
# yamllint enable rule:line-length
35+
}
36+
# yamllint enable rule:line-length

0 commit comments

Comments
 (0)
Please sign in to comment.