Skip to content

Commit 7cdd251

Browse files
committed
versions
1 parent 378d130 commit 7cdd251

13 files changed

Lines changed: 42 additions & 32 deletions

File tree

.github/devcontainers-action/dist/index.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -445,17 +445,20 @@ exports.addCollectionsMetadataFile = addCollectionsMetadataFile;
445445
function pushArtifactToOCI(repositoryOwner, version, featureName, artifactPath) {
446446
return __awaiter(this, void 0, void 0, function* () {
447447
const exec = (0, util_1.promisify)(child_process.exec);
448-
const ociRepo = `${repositoryOwner}/${featureName}:${version}`;
449-
try {
450-
const cmd = `oras push ghcr.io/${ociRepo} \
451-
--manifest-config /dev/null:application/vnd.devcontainers \
452-
./${artifactPath}:application/vnd.devcontainers.layer.v1+tar`;
453-
yield exec(cmd);
454-
console.log(`Pushed artifact to '${ociRepo}'`);
455-
}
456-
catch (error) {
457-
if (error instanceof Error)
458-
core.setFailed(`Failed to push '${ociRepo}': ${error.message}`);
448+
const versions = [version, '1.0', '1']; // TODO: don't hardcode ofc.
449+
for (const v in versions) {
450+
const ociRepo = `${repositoryOwner}/${featureName}:${v}`;
451+
try {
452+
const cmd = `oras push ghcr.io/${ociRepo} \
453+
--manifest-config /dev/null:application/vnd.devcontainers \
454+
./${artifactPath}:application/vnd.devcontainers.layer.v1+tar`;
455+
yield exec(cmd);
456+
console.log(`Pushed artifact to '${ociRepo}'`);
457+
}
458+
catch (error) {
459+
if (error instanceof Error)
460+
core.setFailed(`Failed to push '${ociRepo}': ${error.message}`);
461+
}
459462
}
460463
});
461464
}
@@ -515,8 +518,6 @@ function getFeaturesAndPackage(basePath, opts) {
515518
// ---- PUBLISH TO NPM ----
516519
if (shouldPublishToOCI) {
517520
core.info(`** Publishing to OCI`);
518-
// HACK TO GET THE GITHUB UI TO NOT 500
519-
// END HACK
520521
yield loginToGHCR();
521522
yield pushArtifactToOCI(sourceInfo.owner, featureMetadata.version, f, archiveName);
522523
}

.github/devcontainers-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/devcontainers-action/lib/utils.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,20 @@ exports.addCollectionsMetadataFile = addCollectionsMetadataFile;
152152
function pushArtifactToOCI(repositoryOwner, version, featureName, artifactPath) {
153153
return __awaiter(this, void 0, void 0, function* () {
154154
const exec = (0, util_1.promisify)(child_process.exec);
155-
const ociRepo = `${repositoryOwner}/${featureName}:${version}`;
156-
try {
157-
const cmd = `oras push ghcr.io/${ociRepo} \
158-
--manifest-config /dev/null:application/vnd.devcontainers \
159-
./${artifactPath}:application/vnd.devcontainers.layer.v1+tar`;
160-
yield exec(cmd);
161-
console.log(`Pushed artifact to '${ociRepo}'`);
162-
}
163-
catch (error) {
164-
if (error instanceof Error)
165-
core.setFailed(`Failed to push '${ociRepo}': ${error.message}`);
155+
const versions = [version, '1.0', '1']; // TODO: don't hardcode ofc.
156+
for (const v in versions) {
157+
const ociRepo = `${repositoryOwner}/${featureName}:${v}`;
158+
try {
159+
const cmd = `oras push ghcr.io/${ociRepo} \
160+
--manifest-config /dev/null:application/vnd.devcontainers \
161+
./${artifactPath}:application/vnd.devcontainers.layer.v1+tar`;
162+
yield exec(cmd);
163+
console.log(`Pushed artifact to '${ociRepo}'`);
164+
}
165+
catch (error) {
166+
if (error instanceof Error)
167+
core.setFailed(`Failed to push '${ociRepo}': ${error.message}`);
168+
}
166169
}
167170
});
168171
}
@@ -222,8 +225,6 @@ function getFeaturesAndPackage(basePath, opts) {
222225
// ---- PUBLISH TO NPM ----
223226
if (shouldPublishToOCI) {
224227
core.info(`** Publishing to OCI`);
225-
// HACK TO GET THE GITHUB UI TO NOT 500
226-
// END HACK
227228
yield loginToGHCR();
228229
yield pushArtifactToOCI(sourceInfo.owner, featureMetadata.version, f, archiveName);
229230
}

src/go/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "go",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"name": "Go",
55
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
66
"options": {

src/go/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/go.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10+
# I have made a change!
11+
1012
TARGET_GO_VERSION=${VERSION:-"latest"}
1113

1214
TARGET_GOROOT=${TARGET_GOROOT:-"/usr/local/go"}

src/powershell/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "powershell",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"name": "PowerShell",
55
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
66
"options": {

src/powershell/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/powershell.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10+
# I have made a change!
1011
set -e
1112

1213
POWERSHELL_VERSION=${VERSION:-"latest"}

src/python/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "python",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"name": "Python",
55
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
66
"options": {

src/python/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/python.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10+
# I have made a change!
11+
1012
PYTHON_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
1113
INSTALL_PYTHON_TOOLS=${INSTALL_PYTHON_TOOLS:-"true"}
1214
OPTIMIZE_BUILD_FROM_SOURCE=${OPTIMIZE:-"false"}

src/ruby/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "ruby",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"name": "Ruby (via rvm)",
55
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
66
"options": {

0 commit comments

Comments
 (0)