Skip to content

Commit

Permalink
feat(ci): add publish workflow (#22)
Browse files Browse the repository at this point in the history
since Docker doesn't do builds anymore
  • Loading branch information
crccheck authored Nov 13, 2021
1 parent b14fbb1 commit bbed28c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
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 image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Extract metadata (tags, labels) for Docker
id: meta
# https://github.com/docker/metadata-action
uses: docker/metadata-action@v3
with:
images: crccheck/hello-world

- name: Log in to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
# https://github.com/docker/build-push-action
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Hello World
===========
# Hello World

This is a simple Docker image that just gives http responses on port 8000. It's
small enough to fit on one floppy disk:
Expand All @@ -18,9 +17,7 @@ fresh environment in under a second. I like faster feedback loops.
**THANK YOU** to the surprisingly large number of contributors that have made
this better for everyone over the years.


Sample Usage
------------
## Sample Usage

### Starting a web server on port 80

Expand Down

2 comments on commit bbed28c

@shwetanshu-cldcvr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job Name voting-integration-pipeline-1
Job Status done
View on Code Pipes

@shwetanshu-cldcvr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job Name voting-integration-pipeline-1
Job Status done
View on Code Pipes

Please sign in to comment.