Skip to content

Commit

Permalink
Add docker build GitHub action config
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Jul 31, 2023
1 parent bbabc5b commit b7a9ac2
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Publish Docker Images

on:
workflow_dispatch:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:

jobs:
build_and_publish:
name: Build and Publish Docker images
runs-on: ubuntu-latest
strategy:
matrix:
version:
- '3.6.6'

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

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

- name: Login to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}

# GS64 base image
- name: Gather docker meta data for base image
id: docker_meta_runtime
uses: crazy-max/ghaction-docker-meta@v4
with:
images: ghcr.io/${{ github.repository_owner }}/gs64

- name: Docker build and push base image
uses: docker/build-push-action@v4
with:
context: ./source
file: ./source/Dockerfile
build-args: GS_VERSION=${{ matrix.version }}
target: docker-gs-64-base
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta_runtime.outputs.tags }}
labels: ${{ steps.docker_meta_runtime.outputs.labels }}
secrets: GIT_AUTH_TOKEN=${{ secrets.DOCKER_REGISTRY_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdown Lint
on: [push,pull_request,workflow_dispatch]
jobs:
remark-lint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reporter: github-pr-review
13 changes: 13 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'Shellcheck'

on: [push,pull_request]

jobs:
shellcheck:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- name: 'Run Shellcheck'
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion examples/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ conf/*
data/*
logs/*
locks/*
projects/*
projects/*
1 change: 0 additions & 1 deletion examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ services:
- ./logs/:/opt/gemstone/logs/
- ./projects/:/opt/gemstone/projects/
- ~/.ssh/:/home/gemstone/.ssh/:ro

0 comments on commit b7a9ac2

Please sign in to comment.