From 7668b0b473beedb302d08fbe86ced3cc36d17de0 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 19 Mar 2020 16:19:07 -0500 Subject: [PATCH 1/2] Add CI with GitHub Actions to test and publish --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d62235f --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8ec4a6d --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 From 5f42a081f6bd156bb4a7a2f7db74cafb532b9c43 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 19 Mar 2020 16:23:25 -0500 Subject: [PATCH 2/2] Add hyperlinks and Docker Hub badges to README --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 873b397..2ca7c0a 100644 --- a/README.md +++ b/README.md @@ -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