Skip to content

Commit

Permalink
push docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Sep 4, 2021
1 parent c71ae7d commit df99bfb
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Docker

on:
schedule:
- cron: '19 17 * * *'
push:
branches: [ release-4.x.x ]
tags: [ '*.*.*' ]
pull_request:
branches: [ release-4.x.x ]

env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-18.04
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Log into Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit df99bfb

Please sign in to comment.