Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jun 1, 2022
2 parents ea10936 + 4de04c1 commit 9b9e228
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
target-branch: dev

- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "daily"
target-branch: dev
36 changes: 36 additions & 0 deletions .github/workflows/ghcr_cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
workflow_dispatch:
schedule:
- cron: "*/10 * * * *"
#- cron: "0 4 * * *"

name: GHCR cleanup

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Delete untagged images
uses: actions/github-script@v3
with:
github-token: ${{ secrets.CR_PAT }}
script: |
const response = await github.request("GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions",
{ per_page: ${{ env.PER_PAGE }}
});
for(version of response.data) {
if (version.metadata.container.tags.length == 0) {
try {
console.log("delete " + version.id)
const deleteResponse = await github.request("DELETE /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
console.log("status " + deleteResponse.status)
} catch (e) {
console.log("failed")
}
}
}
env:
OWNER: user
PACKAGE_NAME: zigbee2mqtt
PER_PAGE: 2000
2 changes: 1 addition & 1 deletion .github/workflows/update_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
node-version: 16
- run: rm -rf npm-shrinkwrap.json
- run: npx npm-check-updates -u
- run: npx npm-check-updates -u -x connect-gzip-static # connect-gzip-static only supports node 16
- run: npm install && npm shrinkwrap --dev
- uses: peter-evans/create-pull-request@v4
with:
Expand Down

0 comments on commit 9b9e228

Please sign in to comment.