From 47bdebfb81d7b4e78e886d7eea0bb3234514ddeb Mon Sep 17 00:00:00 2001 From: nametake Date: Thu, 19 Oct 2023 19:38:03 +0900 Subject: [PATCH 1/2] Added gqlfmt container --- .github/workflows/docker-publish.yml | 6 ++-- 20231019/Dockerfile | 48 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 20231019/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 91b079e..7236a29 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -15,7 +15,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [20231013, 20231018] + # TODO 20231018と20231019が1日違いのため、念のため3つにしているが次の段階では2つに戻す + version: [20231013, 20231018, 20231019] steps: - uses: actions/checkout@v3 @@ -28,7 +29,8 @@ jobs: strategy: matrix: - version: [20231013, 20231018] + # TODO 20231018と20231019が1日違いのため、念のため3つにしているが次の段階では2つに戻す + version: [20231013, 20231018, 20231019] steps: - uses: actions/checkout@v3 diff --git a/20231019/Dockerfile b/20231019/Dockerfile new file mode 100644 index 0000000..5031226 --- /dev/null +++ b/20231019/Dockerfile @@ -0,0 +1,48 @@ +FROM gcr.io/google.com/cloudsdktool/cloud-sdk:slim + +ARG GOLANG_VERSION=1.21.0 +ARG GOLANG_DOWNLOAD_SHA256=d0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742 + +ARG GOPATH=/go +ENV GOPATH=${GOPATH} \ + PATH=/go/bin:/usr/local/go/bin:$PATH + +RUN set -eux && \ + # 基本ツール + apt-get update && \ + apt-get install -yqq --no-install-suggests --no-install-recommends \ + libc6-dev \ + make \ + unzip \ + npm \ + dnsutils && \ + rm -rf /var/lib/apt/lists/* && \ + \ + # Go + curl -o go.tgz -sSL "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \ + echo "${GOLANG_DOWNLOAD_SHA256} *go.tgz" | sha256sum -c - && \ + tar -C /usr/local -xzf go.tgz && \ + rm go.tgz && \ + mkdir ${GOPATH} && \ + \ + # 各種ツール + go install golang.org/x/tools/cmd/goimports@latest && \ + go install mvdan.cc/gofumpt@latest && \ + go install github.com/daixiang0/gci@latest && \ + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 && \ + go install github.com/Yamashou/gqlgenc@v0.15.1 && \ + go install github.com/gqlgo/nodecheck/cmd/nodecheck@v1.0.1 && \ + go install github.com/gqlgo/deprecatedquery/cmd/deprecatedquery@v0.0.3 && \ + go install github.com/gqlgo/optionalschema/cmd/optionalschema@v0.0.2 && \ + go install github.com/gqlgo/operationname/cmd/operationname@v0.0.1 && \ + go install github.com/gqlgo/iddirective/cmd/iddirective@v0.0.1 && \ + go install github.com/builtbystack/nopermission/cmd/nopermission@v0.0.2 && \ + go install mvdan.cc/sh/v3/cmd/shfmt@latest && \ + go install github.com/google/yamlfmt/cmd/yamlfmt@latest && \ + go install github.com/gqlgo/gqlfmt@latest && \ + go install github.com/google/ko@v0.12.0 && \ + go install github.com/sonatard/runenv@latest && \ + rm -rf ${GOPATH}/src ${GOPATH}/pkg && \ + \ + # Artifact RegistryにPushするための認証設定 + gcloud auth configure-docker asia-northeast1-docker.pkg.dev From fe095cbbf678116755013ac951f4e4fbbac87fe3 Mon Sep 17 00:00:00 2001 From: nametake Date: Thu, 19 Oct 2023 19:39:37 +0900 Subject: [PATCH 2/2] Removed 20231013 --- .github/workflows/docker-publish.yml | 6 ++-- 20231013/Dockerfile | 46 ---------------------------- 2 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 20231013/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7236a29..ccc6551 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -15,8 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - # TODO 20231018と20231019が1日違いのため、念のため3つにしているが次の段階では2つに戻す - version: [20231013, 20231018, 20231019] + version: [20231018, 20231019] steps: - uses: actions/checkout@v3 @@ -29,8 +28,7 @@ jobs: strategy: matrix: - # TODO 20231018と20231019が1日違いのため、念のため3つにしているが次の段階では2つに戻す - version: [20231013, 20231018, 20231019] + version: [20231018, 20231019] steps: - uses: actions/checkout@v3 diff --git a/20231013/Dockerfile b/20231013/Dockerfile deleted file mode 100644 index 189feab..0000000 --- a/20231013/Dockerfile +++ /dev/null @@ -1,46 +0,0 @@ -FROM gcr.io/google.com/cloudsdktool/cloud-sdk:slim - -ARG GOLANG_VERSION=1.21.0 -ARG GOLANG_DOWNLOAD_SHA256=d0398903a16ba2232b389fb31032ddf57cac34efda306a0eebac34f0965a0742 - -ARG GOPATH=/go -ENV GOPATH=${GOPATH} \ - PATH=/go/bin:/usr/local/go/bin:$PATH - -RUN set -eux && \ - # 基本ツール - apt-get update && \ - apt-get install -yqq --no-install-suggests --no-install-recommends \ - libc6-dev \ - make \ - unzip \ - npm \ - dnsutils && \ - rm -rf /var/lib/apt/lists/* && \ - \ - # Go - curl -o go.tgz -sSL "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \ - echo "${GOLANG_DOWNLOAD_SHA256} *go.tgz" | sha256sum -c - && \ - tar -C /usr/local -xzf go.tgz && \ - rm go.tgz && \ - mkdir ${GOPATH} && \ - \ - # 各種ツール - go install golang.org/x/tools/cmd/goimports@latest && \ - go install mvdan.cc/gofumpt@latest && \ - go install github.com/daixiang0/gci@latest && \ - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 && \ - go install github.com/Yamashou/gqlgenc@v0.15.1 && \ - go install github.com/gqlgo/nodecheck/cmd/nodecheck@v1.0.1 && \ - go install github.com/gqlgo/deprecatedquery/cmd/deprecatedquery@v0.0.3 && \ - go install github.com/gqlgo/optionalschema/cmd/optionalschema@v0.0.2 && \ - go install github.com/gqlgo/operationname/cmd/operationname@v0.0.1 && \ - go install github.com/gqlgo/iddirective/cmd/iddirective@v0.0.1 && \ - go install github.com/builtbystack/nopermission/cmd/nopermission@v0.0.2 && \ - go install mvdan.cc/sh/v3/cmd/shfmt@latest && \ - go install github.com/google/ko@v0.12.0 && \ - go install github.com/sonatard/runenv@latest && \ - rm -rf ${GOPATH}/src ${GOPATH}/pkg && \ - \ - # Artifact RegistryにPushするための認証設定 - gcloud auth configure-docker asia-northeast1-docker.pkg.dev