Skip to content

Commit

Permalink
Merge pull request #329 from swisstopo/fix/release-cleanup
Browse files Browse the repository at this point in the history
Fix failing cleanup job
  • Loading branch information
daniel-va authored Oct 30, 2024
2 parents d93ee3d + 310ccf4 commit 9a28c3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/remove-packages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { Octokit } = require("@octokit/rest");

const removePackageVersions = async (imageUrl, imageVersions) => {
const { Octokit } = await import("@octokit/rest");

const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});
Expand All @@ -11,7 +11,7 @@ const removePackageVersions = async (imageUrl, imageVersions) => {
await octokit.rest.packages.deletePackageVersionForOrg({
package_type: "container",
package_name: imageName,
username: imageOwner,
org: imageOwner,
package_version_id: imageId,
});
}
Expand All @@ -26,7 +26,7 @@ const loadOutdatedVersionIds = async (octokit, imageOwner, imageName, versions)
const response = await octokit.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({
package_type: "container",
package_name: imageName,
username: imageOwner,
org: imageOwner,
page,
});
if (response.data.length === 0) {
Expand Down

0 comments on commit 9a28c3d

Please sign in to comment.