Add Dockerfile for steampipe and automated image deploy. Closes #662. Closes #677

This commit is contained in:
Binaek Sarkar
2021-07-30 03:06:49 +05:30
committed by GitHub
parent 38665a78f1
commit fbfebd0db8
4 changed files with 101 additions and 5 deletions

46
.github/workflows/publish_docker.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Publish Docker Release
on:
workflow_dispatch:
inputs:
release:
description: "The name of the released version to publish"
required: true
env:
STEAMPIPE_VERSION: ${{ github.event.inputs.release }}
jobs:
publish_docker:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Clean Version for Tag
id: generate_docker_tag
run: |
echo "::set-output name=docker_tag::${STEAMPIPE_VERSION#"v"}"
- name: Build and Push to Docker Hub
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
build-args: |
TARGETOS=linux
TARGETARCH=amd64
TARGETVERSION=${{ env.STEAMPIPE_VERSION }}
tags: |
turbot/steampipe:${{ steps.generate_docker_tag.outputs.docker_tag }}
turbot/steampipe:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -3,10 +3,10 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'The branch that will be built'
description: "The branch that will be built"
required: true
tag:
description: 'The release tag that will be set'
description: "The release tag that will be set"
required: true
env:
@@ -16,7 +16,7 @@ jobs:
goreleaser:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -70,10 +70,9 @@ jobs:
needs: goreleaser
strategy:
matrix:
platform: [ ubuntu-latest ]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v2
with: