diff --git a/.github/base-dockerfile/Dockerfile b/.github/base-dockerfile/Dockerfile index edbe14f3..e165e091 100644 --- a/.github/base-dockerfile/Dockerfile +++ b/.github/base-dockerfile/Dockerfile @@ -19,13 +19,13 @@ RUN set -xe && \ dpkg-divert --local --rename --add /sbin/initctl && \ cp -a /usr/sbin/policy-rc.d /sbin/initctl && \ sed -i 's/^exit.*/exit 0/' /sbin/initctl && \ - echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && \ + echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && \ echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean && \ echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean && \ echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean && \ echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages && \ echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes && \ - echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests && \ + echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests && \ rm -rf /var/lib/apt/lists/* && \ mkdir -p /run/systemd && echo 'docker' > /run/systemd/container && \ rm -f /etc/localtime && \ @@ -49,7 +49,7 @@ RUN wget https://s3.amazonaws.com/bosh-cli-artifacts/bosh-cli-${BOSH_CLI_VERSION RUN wget https://github.com/pivotal-cf/om/releases/download/${OM_VERSION}/om-linux-${OM_VERSION} -O om-linux && \ mv om-linux /usr/local/bin/om && \ chmod +x /usr/local/bin/om -RUN wget https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_CLI_VERSION}/credhub-linux-${CREDHUB_CLI_VERSION}.tgz -O credhub.tgz && \ +RUN wget https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_CLI_VERSION}/credhub-linux-${CREDHUB_CLI_VERSION}.tgz -O credhub.tgz && \ tar xzf ./credhub.tgz && \ mv credhub /usr/local/bin/credhub && \ chmod +x /usr/local/bin/credhub && \ diff --git a/.github/workflows/create-release-package.yml b/.github/workflows/create-release-package.yml index ad268ada..99c50894 100644 --- a/.github/workflows/create-release-package.yml +++ b/.github/workflows/create-release-package.yml @@ -24,8 +24,37 @@ on: jobs: + golangci-lint-action: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.1 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. + version: v1.32 + + # Optional: working directory, useful for monorepos + # working-directory: + + args: --timeout 10m + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true + + shellcheck-action: + name: shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Run ShellCheck + uses: bewuethr/shellcheck-action@v2 + build: name: Build + needs: [golangci-lint-action, shellcheck-action] runs-on: ubuntu-18.04 steps: @@ -82,7 +111,7 @@ jobs: asset_path: ./atlas-osb.${{ steps.semver.outputs.version }}.tar.gz asset_name: atlas-osb.${{ steps.semver.outputs.version }}.tar.gz asset_content_type: application/tgz - + - name: Push Atlas-osb to Registry uses: docker/build-push-action@v1 with: diff --git a/dev/scripts/build-production-binary.sh b/dev/scripts/build-production-binary.sh index a18c73d8..cc5e3320 100755 --- a/dev/scripts/build-production-binary.sh +++ b/dev/scripts/build-production-binary.sh @@ -10,7 +10,5 @@ fi set -xeuf - release_version=$(git describe --always --dirty) GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w -X main.releaseVersion=$release_version" -o "$1" -golangci-lint run