mirror of
https://github.com/kaiju/docker-gophernicus.git
synced 2025-04-13 09:30:16 +00:00
taking a stab at github actions
This commit is contained in:
parent
8c4669b5ee
commit
5896f5667e
1 changed files with 39 additions and 0 deletions
39
.github/workflows/docker-publish.yml
vendored
Normal file
39
.github/workflows/docker-publish.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
name: docker-publish
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: joshkaiju/gophernicus
|
||||||
|
- name: Setup Docker build
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
- name: Login to Docker hub
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||||
|
- name: Build and publish
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue