Skip to content

Commit

Permalink
Add docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
tjaartvdwalt committed Aug 16, 2023
1 parent 937f8ad commit 1e70fa2
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-build-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docker build latest
on:
push:
branches:
- master

env:
IMAGE_NAME: outsideopen/opencanary
TAG: latest

jobs:
build-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.latest
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:${{ env.TAG }}
cache-to: type=inline
tags: ghcr.io/${{ github.repository }}:${{ env.TAG }}

0 comments on commit 1e70fa2

Please sign in to comment.