Files
terraform-docs/.github/workflows/prerelease.yaml
dependabot[bot] aa89342f7f build: bump golang from 1.15.2-alpine to 1.15.6-alpine (#352)
* build: bump golang from 1.15.2-alpine to 1.15.6-alpine

Bumps golang from 1.15.2-alpine to 1.15.6-alpine.

Signed-off-by: dependabot[bot] <support@github.com>

* update CI to use go1.15.6

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-01-04 15:10:29 -05:00

55 lines
1.4 KiB
YAML

name: prerelease
on:
push:
tags:
- 'v*.*.*-*'
jobs:
prerelease:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15.6
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build binaries for all OS/ARCH platforms
run: |
export PATH=$PATH:$(go env GOPATH)/bin
make gox build-all
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/terraform-docs-v*
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set version output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:11} # tag name without leading 'v'
- name: Build and push Docker image
run: |
echo ${REGISTRY_PASSWORD} | docker login -u ${REGISTRY_USERNAME} --password-stdin quay.io
DOCKER_TAG=${{ steps.vars.outputs.tag }} make docker push
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}