Skip to content

Commit

Permalink
Merge pull request lukasheinrich#4 from matthewfeickert/ci/add-GHA-fo…
Browse files Browse the repository at this point in the history
…r-deployment

ci: Add GitHub Actions for testing build and deployment to Docker Hub
  • Loading branch information
lukasheinrich authored Mar 19, 2020
2 parents ae99cee + 5f42a08 commit 611139f
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI/CD

on:
push:
schedule:
- cron: '1 0 * * *'

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Build Docker image
run: |
docker build . \
--file simple/Dockerfile \
--tag lukasheinrich/folding:$GITHUB_SHA \
--compress
docker images
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Docker Images

on:
push:
branches:
- master
tags:
- v*

jobs:
build-and-publish:
name: Build and publish Docker images to Docker Hub
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Build and Publish to Registry
if: "! ${{ startsWith(github.ref, 'refs/tags/') }}"
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: lukasheinrich/folding
dockerfile: simple/Dockerfile
tags: latest,simple
- name: Build and Publish to Registry with Release Tag
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: lukasheinrich/folding
dockerfile: simple/Dockerfile
tags: latest,latest-stable,simple
tag_with_ref: true
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# folding-at-home-docker
docker images for folding @ home
# Folding@home Docker images

Docker images for [Folding@home](https://foldingathome.org/)

[![Docker Pulls](https://img.shields.io/docker/pulls/lukasheinrich/folding)](https://hub.docker.com/r/lukasheinrich/folding)
[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/lukasheinrich/folding/simple)](https://hub.docker.com/r/lukasheinrich/folding/tags?name=simple)

## Build image

```
docker build -t lukasheinrich/folding:simple . -f simple/Dockerfile
```

Usage
## Usage

```
docker run lukasheinrich/folding:simple
Expand Down

0 comments on commit 611139f

Please sign in to comment.