Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
one linter (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-ri authored Jun 29, 2021
1 parent bf453ea commit e6df878
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/base-dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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 && \
Expand Down
31 changes: 30 additions & 1 deletion .github/workflows/create-release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions dev/scripts/build-production-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e6df878

Please sign in to comment.