Skip to content

Commit

Permalink
automatically publish docker images with gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucat1 committed Jul 4, 2023
1 parent 1e20c2e commit 0fe1f4a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build

on:
push:
tags:
- '**'
branches:
- 'main'

jobs:
docker:
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 GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
if: startsWith(github.event.ref, 'refs/tags/v')
with:
context: .
push: true
tags: ghcr.io/lucat1/statik:${{ github.ref_name }}
- name: Build and push
uses: docker/build-push-action@v3
if: startsWith(github.event.ref, 'refs/tags/v') != true
with:
context: .
push: true
tags: ghcr.io/lucat1/statik:latest

0 comments on commit 0fe1f4a

Please sign in to comment.