diff --git a/.beta-goreleaser.yml b/.beta-goreleaser.yml index 96905f7..dba0ad4 100644 --- a/.beta-goreleaser.yml +++ b/.beta-goreleaser.yml @@ -35,5 +35,10 @@ brews: name: goreleaserbot email: goreleaser@stelligent.com folder: Formula/beta +dockers: + - + dockerfile: .dockerhub/Dockerfile + image_templates: + - "stelligent/config-lint:{{ .Tag }}" release: prerelease: auto diff --git a/.dockerhub/Dockerfile b/.dockerhub/Dockerfile new file mode 100644 index 0000000..f743435 --- /dev/null +++ b/.dockerhub/Dockerfile @@ -0,0 +1,3 @@ +FROM scratch +COPY config-lint / +ENTRYPOINT ["/config-lint"] diff --git a/.github/workflows/beta_build_and_deploy.yml b/.github/workflows/beta_build_and_deploy.yml index f9be355..e0c916c 100644 --- a/.github/workflows/beta_build_and_deploy.yml +++ b/.github/workflows/beta_build_and_deploy.yml @@ -10,17 +10,36 @@ on: jobs: build: runs-on: ubuntu-latest - container: golang:1.12 steps: - - uses: actions/checkout@master - - name: dependencies - run: go mod download - - name: make test - run: make test - - name: beta release + - + name: checkout + uses: actions/checkout@master + - + name: setup go + uses: actions/setup-go@v1 + with: + go-version: '1.12' + - + name: dependencies + run: | + go mod download + - + name: docker login env: - GITHUB_TOKEN: ${{ secrets.goreleaser }} - if: success() + DOCKER_USER: ${{ secrets.docker_user }} + DOCKER_PASSWORD: ${{ secrets.docker_password }} + run: | + echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin + - + name: make test run: | - go get github.com/goreleaser/goreleaser - goreleaser release --skip-validate --config=.beta-goreleaser.yml \ No newline at end of file + export GOPATH=/home/runner/go + export PATH="$PATH:$GOPATH/bin" + make test + - + name: beta release + uses: goreleaser/goreleaser-action@v1 + with: + args: release --skip-validate --config=.beta-goreleaser.yml + env: + GITHUB_TOKEN: ${{ secrets.goreleaser }}