Skip to content

Commit

Permalink
fix: build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Lindamood committed Mar 8, 2024
1 parent da22cd2 commit 30877ec
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 78 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,32 @@ jobs:
run: go mod verify
- name: Test
run: go test -v ./...
- name: Docker build
run: docker build -t atlantis-drift-detection .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
images: |
ghcr.io/cresta/atlantis-drift-detection
- name: Build and push
uses: docker/build-push-action@v5
with:
# Push only if tag
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*


ARG TERRAFORM_VERSION=1.2.3
# Download terraform for linux
ARG TERRAFORM_VERSION=1.7.4
RUN wget --quiet https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& mv terraform /usr/bin \
Expand Down
47 changes: 24 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bradleyfalzon/ghinstallation v1.1.1 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.8.0 // indirect
github.com/bradleyfalzon/ghinstallation/v2 v2.9.0 // indirect
github.com/cactus/go-statsd-client/v5 v5.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
Expand All @@ -52,16 +52,16 @@ require (
github.com/go-ozzo/ozzo-validation v3.6.0+incompatible // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.16.0 // indirect
github.com/go-playground/validator/v10 v10.19.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v29 v29.0.3 // indirect
github.com/google/go-github/v56 v56.0.0 // indirect
github.com/google/go-github/v57 v57.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
Expand All @@ -73,14 +73,13 @@ require (
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/terraform-config-inspect v0.0.0-20231204233900-a34142ec2a72 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mcdafydd/go-azuredevops v0.12.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -90,32 +89,34 @@ require (
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.50.0 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/remeh/sizedwaitgroup v1.0.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/shurcooL/githubv4 v0.0.0-20231126234147-1cffa1f02456 // indirect
github.com/shurcooL/githubv4 v0.0.0-20240120211514-18a1ae0e79dc // indirect
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
github.com/slack-go/slack v0.12.3 // indirect
github.com/slack-go/slack v0.12.5 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/twmb/murmur3 v1.1.8 // indirect
github.com/uber-go/tally/v4 v4.1.10 // indirect
github.com/uber-go/tally/v4 v4.1.11 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/warrensbox/terraform-switcher v0.1.1-0.20230206012955-d7dfd1b44605 // indirect
github.com/xanzy/go-gitlab v0.96.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
github.com/xanzy/go-gitlab v0.99.0 // indirect
github.com/zclconf/go-cty v1.14.3 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 30877ec

Please sign in to comment.