Skip to content

Commit

Permalink
Merge pull request #130 from stuartleeks/sl/repo-move-docs-update
Browse files Browse the repository at this point in the history
Update docs etc after repo transfer
  • Loading branch information
stuartleeks authored Jun 8, 2022
2 parents 7cafdc7 + b27d826 commit 7d2292c
Show file tree
Hide file tree
Showing 31 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "devcontainer-build-run",
"dockerFile": "Dockerfile",
"build": {
"cacheFrom": "ghcr.io/stuartleeks/devcontainer-build-run-devcontainer:latest"
"cacheFrom": "ghcr.io/devcontainers/ci-devcontainer:latest"
},
"mounts": [
// Keep command history
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
with:
imageName: ghcr.io/stuartleeks/devcontainer-build-run-devcontainer
imageName: ghcr.io/devcontainers/ci-devcontainer
imageTag: ${{ steps.set_image_tag.outputs.image_tag }}
runCmd: |
echo "Starting"
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
IS_PR: ${{ github.head_ref }}
BRANCH: ${{ github.ref }}
with:
imageName: ghcr.io/stuartleeks/devcontainer-build-run-devcontainer
imageName: ghcr.io/devcontainers/ci-devcontainer
runCmd: |
echo "Starting"
./scripts/publish-azdo-task.sh
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
BRANCH: ${{ github.ref }}
IMAGE_TAG: ${{ needs.build.outputs.image_tag }}
with:
imageName: ghcr.io/stuartleeks/devcontainer-build-run-devcontainer
imageName: ghcr.io/devcontainers/ci-devcontainer
runCmd: |
echo "Starting"
./scripts/test-azdo.sh
Expand Down Expand Up @@ -392,7 +392,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/run-args
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/run-args
imageName: ghcr.io/devcontainers/ci/tests/run-args
runCmd: echo $HOSTNAME && [[ $HOSTNAME == "my-host" ]]
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -426,7 +426,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/build-args
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/build-args
imageName: ghcr.io/devcontainers/ci/tests/build-args
runCmd: echo $BUILD_ARG_TEST && [[ $BUILD_ARG_TEST == "Hello build-args!" ]]
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -460,7 +460,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/dockerfile-context
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/dockerfile-context
imageName: ghcr.io/devcontainers/ci/tests/dockerfile-context
runCmd: /tmp/dummy.sh
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -494,7 +494,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/feature-docker-from-docker
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/feature-docker-from-docker
imageName: ghcr.io/devcontainers/ci/tests/feature-docker-from-docker
runCmd: make docker-build
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -528,7 +528,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/docker-from-docker-non-root
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/docker-from-docker-non-root
imageName: ghcr.io/devcontainers/ci/tests/docker-from-docker-non-root
runCmd: make docker-build
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -562,7 +562,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/docker-from-docker-root
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/docker-from-docker-root
imageName: ghcr.io/devcontainers/ci/tests/docker-from-docker-root
runCmd: make docker-build
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down Expand Up @@ -596,7 +596,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/Dockerfile/skip-user-update
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/skip-user-update
imageName: ghcr.io/devcontainers/ci/tests/skip-user-update
skipContainerUserIdUpdate: true
runCmd: |
echo "Get user/group info ..."
Expand Down Expand Up @@ -638,7 +638,7 @@ jobs:
uses: ./
with:
subFolder: github-tests/docker-compose/features
imageName: ghcr.io/stuartleeks/devcontainer-build-run/tests/compose-features
imageName: ghcr.io/devcontainers/ci/tests/compose-features
runCmd: go version
imageTag: ${{ needs.build.outputs.image_tag }}
eventFilterForPush: | # allow image push on pull_request
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean_tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ image_names=(
for image_name in ${image_names[@]};
do
escaped_image_name=$(echo ${image_name} | sed "s/\//%2f/g")
version_id=$( curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/users/stuartleeks/packages/container/$escaped_image_name/versions" | jq -r ".[] | select(.metadata.container.tags | index(\"${tag}\")) | .id")
version_id=$( curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/orgs/devcontainers/packages/container/$escaped_image_name/versions" | jq -r ".[] | select(.metadata.container.tags | index(\"${tag}\")) | .id")
if [[ -n $version_id ]]; then
echo "Found version '$version_id' for '$image_name:$tag' - deleting..."
curl -s -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/users/stuartleeks/packages/container/$escaped_image_name/versions/$version_id"
curl -s -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/orgs/devcontainers/packages/container/$escaped_image_name/versions/$version_id"
else
echo "Tag '$tag' not found for '$image_name:$tag' - skipping"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean_untagged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ for image_name in ${image_names[@]};
do
echo "Checking for untagged versions for $image_name"
escaped_image_name=$(echo ${image_name} | sed "s/\//%2f/g")
version_ids=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/users/stuartleeks/packages/container/$escaped_image_name/versions?per_page=100" | jq -r ".[] | select(.metadata.container.tags | length ==0) | .id")
version_ids=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/orgs/devcontainers/packages/container/$escaped_image_name/versions?per_page=100" | jq -r ".[] | select(.metadata.container.tags | length ==0) | .id")
for version_id in ${version_ids[@]};
do
echo -e "\tDeleting version '$version_id' for '$image_name:$tag' ..."
curl -s -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/users/stuartleeks/packages/container/$escaped_image_name/versions/$version_id"
curl -s -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/orgs/devcontainers/packages/container/$escaped_image_name/versions/$version_id"
done
done
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2021 Stuart Leeks
Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The example below shows usage of the GitHub Action - see the [GitHub Action docu

```yaml
- name: Build and run dev container task
uses: stuartleeks/devcontainer-build-run@v0.1
uses: devcontainers/ci@v0.1
with:
imageName: ghcr.io/example/example-devcontainer
runCmd: make ci-build
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'devcontainer-build-run'
name: 'devcontainers-ci'
description: 'Action to simplify using VS Code dev containers in GitHub workflows'
author: 'stuartleeks'
author: 'devcontainers'
branding:
color: purple
icon: box
Expand Down
6 changes: 3 additions & 3 deletions azdo-task/DevContainerBuildRun/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function runMain() {
task.setTaskVariable('hasRunMain', 'true');
const buildXInstalled = yield docker_1.isDockerBuildXInstalled();
if (!buildXInstalled) {
console.log('### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/stuartleeks/devcontainer-build-run/blob/main/docs/azure-devops-task.md');
console.log('### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/devcontainers/ci/blob/main/docs/azure-devops-task.md');
return;
}
const devContainerCliInstalled = yield dev_container_cli_1.devcontainer.isCliInstalled(exec_1.exec);
Expand Down Expand Up @@ -17109,7 +17109,7 @@ function loadFromString(content) {
return config;
}
function getWorkspaceFolder(config, repoPath) {
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/stuartleeks/devcontainer-build-run/issues/66)
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/devcontainers/ci/issues/66)
// // https://code.visualstudio.com/docs/remote/containers-advanced#_changing-the-default-source-code-mount
// if (config.workspaceFolder) {
// return config.workspaceFolder
Expand Down Expand Up @@ -17346,7 +17346,7 @@ function runContainer(exec, imageName, imageTag, checkoutPath, subFolder, comman
const workdir = external_path_default().join(workspaceFolder, subFolder);
const remoteUser = getRemoteUser(devcontainerConfig);
const args = ['run', '--rm'];
args.push('--label', `github.com/stuartleeks/devcontainer-build-run/`);
args.push('--label', `github.com/devcontainers/ci/`);
args.push('--mount', `type=bind,src=${checkoutPathAbsolute},dst=${workspaceFolder}`);
if (devcontainerConfig.mounts) {
devcontainerConfig.mounts
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevContainerBuildRun/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion azdo-task/DevContainerBuildRun/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function runMain() {
task.setTaskVariable('hasRunMain', 'true');
const buildXInstalled = yield docker_1.isDockerBuildXInstalled();
if (!buildXInstalled) {
console.log('### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/stuartleeks/devcontainer-build-run/blob/main/docs/azure-devops-task.md');
console.log('### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/devcontainers/ci/blob/main/docs/azure-devops-task.md');
return;
}
const devContainerCliInstalled = yield dev_container_cli_1.devcontainer.isCliInstalled(exec_1.exec);
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevContainerBuildRun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/stuartleeks/devcontainer-build-run.git"
"url": "git+https://github.com/sdevcontainers/ci.git"
},
"keywords": [
"actions",
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/DevContainerBuildRun/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function runMain(): Promise<void> {
const buildXInstalled = await isDockerBuildXInstalled();
if (!buildXInstalled) {
console.log(
'### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/stuartleeks/devcontainer-build-run/blob/main/docs/azure-devops-task.md',
'### WARNING: docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/devcontainers/ci/blob/main/docs/azure-devops-task.md',
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion azdo-task/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2021 Stuart Leeks
Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions azdo-task/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
],
"links": {
"repository": {
"uri": "https://github.com/stuartleeks/devcontainer-build-run/"
"uri": "https://github.com/devcontainers/ci"
},
"issues": {
"uri": "https://github.com/stuartleeks/devcontainer-build-run/issues"
"uri": "https://github.com/devcontainers/ci/issues"
}
},
"icons": {
"default": "icon.png"
},
"repository": {
"type": "git",
"uri": "https://github.com/stuartleeks/devcontainer-build-run/"
"uri": "https://github.com/devcontainers/ci"
},
"content": {
"details": {
Expand Down
2 changes: 1 addition & 1 deletion common/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '../src/config';

describe('getWorkspaceFolder', () => {
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/stuartleeks/devcontainer-build-run/issues/66)
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/devcontainers/ci/issues/66)
// test('returns configured workspaceFolder', () => {
// const repoPath = '/path/to/project-folder'
// const devcontainerConfig: DevContainerConfig = {
Expand Down
2 changes: 1 addition & 1 deletion common/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function getWorkspaceFolder(
config: DevContainerConfig,
repoPath: string,
): string {
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/stuartleeks/devcontainer-build-run/issues/66)
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/devcontainers/ci/issues/66)
// // https://code.visualstudio.com/docs/remote/containers-advanced#_changing-the-default-source-code-mount
// if (config.workspaceFolder) {
// return config.workspaceFolder
Expand Down
2 changes: 1 addition & 1 deletion common/src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export async function runContainer(
const remoteUser = config.getRemoteUser(devcontainerConfig);

const args = ['run', '--rm'];
args.push('--label', `github.com/stuartleeks/devcontainer-build-run/`);
args.push('--label', `github.com/devcontainers/ci/`);
args.push(
'--mount',
`type=bind,src=${checkoutPathAbsolute},dst=${workspaceFolder}`,
Expand Down
2 changes: 1 addition & 1 deletion common_lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function loadFromString(content) {
}
exports.loadFromString = loadFromString;
function getWorkspaceFolder(config, repoPath) {
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/stuartleeks/devcontainer-build-run/issues/66)
// TODO - need to check workspaceMount/workspaceFolder to set the source mount (https://github.com/devcontainers/ci/issues/66)
// // https://code.visualstudio.com/docs/remote/containers-advanced#_changing-the-default-source-code-mount
// if (config.workspaceFolder) {
// return config.workspaceFolder
Expand Down
2 changes: 1 addition & 1 deletion common_lib/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function runContainer(exec, imageName, imageTag, checkoutPath, subFolder, comman
const workdir = path_1.default.join(workspaceFolder, subFolder);
const remoteUser = config.getRemoteUser(devcontainerConfig);
const args = ['run', '--rm'];
args.push('--label', `github.com/stuartleeks/devcontainer-build-run/`);
args.push('--label', `github.com/devcontainers/ci/`);
args.push('--mount', `type=bind,src=${checkoutPathAbsolute},dst=${workspaceFolder}`);
if (devcontainerConfig.mounts) {
devcontainerConfig.mounts
Expand Down
6 changes: 3 additions & 3 deletions docs/github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and run dev container task
uses: stuartleeks/devcontainer-build-run@v0.1
uses: devcontainers/ci@v0.2
with:
# Change this to point to your image name
imageName: ghcr.io/example/example-devcontainer
Expand Down Expand Up @@ -91,7 +91,7 @@ To build and run the dev container from `folderB` you can specify the `subFolder

```yaml
- name: Build and run dev container task
uses: stuartleeks/devcontainer-build-run@v0.1
uses: devcontainers/ci@v0.2
with:
subFolder: folderB
imageName: ghcr.io/example/example-devcontainer
Expand All @@ -105,7 +105,7 @@ If you want to pass additional environment variables to the dev container when i

```yaml
- name: Build and run dev container task
uses: stuartleeks/devcontainer-build-run@v0.1
uses: devcontainers/ci@v0.2
env:
WORLD: World
with:
Expand Down
6 changes: 3 additions & 3 deletions github-action/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion github-action/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion github-action/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function runMain() {
core.saveState('hasRunMain', 'true');
const buildXInstalled = yield docker_1.isDockerBuildXInstalled();
if (!buildXInstalled) {
core.warning('docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/stuartleeks/devcontainer-build-run/blob/main/docs/github-action.md');
core.warning('docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/devcontainers/ci/blob/main/docs/github-action.md');
return;
}
const devContainerCliInstalled = yield dev_container_cli_1.devcontainer.isCliInstalled(exec_1.exec);
Expand Down
2 changes: 1 addition & 1 deletion github-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/stuartleeks/devcontainer-build-run.git"
"url": "git+https://github.com/devcontainers/ci.git"
},
"keywords": [
"actions",
Expand Down
2 changes: 1 addition & 1 deletion github-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function runMain(): Promise<void> {
const buildXInstalled = await isDockerBuildXInstalled();
if (!buildXInstalled) {
core.warning(
'docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/stuartleeks/devcontainer-build-run/blob/main/docs/github-action.md',
'docker buildx not available: add a step to set up with docker/setup-buildx-action - see https://github.com/devcontainers/ci/blob/main/docs/github-action.md',
);
return;
}
Expand Down
Loading

0 comments on commit 7d2292c

Please sign in to comment.