Skip to content

Commit

Permalink
First cut at a GHA to automatically deploy. This is the first start for
Browse files Browse the repository at this point in the history
  • Loading branch information
blthayer committed Nov 22, 2020
1 parent 639ae25 commit 6e035ce
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and push blthayer/disquip-bot

on:
push:

jobs:

build-and-push:
name: Build and push
runs-on: ubuntu-latest

steps:
- name: Checkout this repo
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}

- name: Repo metadata
id: repo
uses: actions/github-script@v3
with:
script: |
const repo = await github.repos.get(context.repo)
return repo.data
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: blthayer/disquip-bot
tag-sha: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# Build and push!
- name: Build builder stage of gldpy
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit 6e035ce

Please sign in to comment.