Skip to content

Commit

Permalink
Move from docker to github container registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbithell committed Jun 27, 2021
1 parent c5da997 commit 12bb119
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dockerBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository }}
tag-sha: false
tag-semver: |
{{version}}
{{major}}.{{minor}}
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit 12bb119

Please sign in to comment.