зеркало из https://github.com/docker/node-sdk.git
Remove token not required anymore
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Родитель
217f47c008
Коммит
888ecbf82a
|
@ -13,8 +13,6 @@ jobs:
|
|||
|
||||
- name: Test
|
||||
run: make test
|
||||
env:
|
||||
DOCKER_GITHUB_TOKEN: ${{ secrets.DOCKER_GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: make build
|
||||
|
|
|
@ -38,13 +38,9 @@ FROM base AS test
|
|||
CMD ["yarn", "test"]
|
||||
VOLUME ["/var/run/docker.sock"]
|
||||
COPY --from=docker /usr/local/bin/docker /usr/local/bin/com.docker.cli
|
||||
ARG DOCKER_GITHUB_TOKEN
|
||||
ENV DOCKER_GITHUB_TOKEN=${DOCKER_GITHUB_TOKEN}
|
||||
RUN yarn download-cli
|
||||
|
||||
FROM base AS download-protos
|
||||
ARG DOCKER_GITHUB_TOKEN
|
||||
ENV DOCKER_GITHUB_TOKEN=${DOCKER_GITHUB_TOKEN}
|
||||
RUN yarn download-protos
|
||||
RUN ./protos.sh
|
||||
|
||||
|
|
13
Makefile
13
Makefile
|
@ -23,8 +23,8 @@ build:
|
|||
@docker build --target build --output ./src .
|
||||
|
||||
.PHONY: test
|
||||
test: check-token
|
||||
@docker build --target test --tag ${IMG} --build-arg DOCKER_GITHUB_TOKEN .
|
||||
test:
|
||||
@docker build --target test --tag ${IMG} .
|
||||
@docker run --rm \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
${IMG}
|
||||
|
@ -35,11 +35,6 @@ lint:
|
|||
@docker build --target lint .
|
||||
|
||||
.PHONY: protos
|
||||
protos: check-token
|
||||
@docker build --target protos --build-arg DOCKER_GITHUB_TOKEN --output ./src .
|
||||
protos:
|
||||
@docker build --target protos --output ./src .
|
||||
|
||||
.PHONY: check-token
|
||||
check-token:
|
||||
ifeq (${DOCKER_GITHUB_TOKEN},)
|
||||
$(error "Set DOCKER_GITHUB_TOKEN with a GitHub token that has access to docker/compose-cli")
|
||||
endif
|
||||
|
|
|
@ -57,7 +57,6 @@ const download = async () => {
|
|||
owner: 'docker',
|
||||
repo: 'compose-cli',
|
||||
asset_id: linuxAsset.id,
|
||||
access_token: process.env.DOCKER_GITHUB_TOKEN,
|
||||
});
|
||||
|
||||
const response = await request(options);
|
||||
|
|
|
@ -19,9 +19,7 @@ import * as path from 'path';
|
|||
import { Readable } from 'stream';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.DOCKER_GITHUB_TOKEN,
|
||||
});
|
||||
const octokit = new Octokit({});
|
||||
|
||||
const get = async (p: string) => {
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче