Skip to content

Commit

Permalink
actions: push to Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
ribbybibby committed Sep 11, 2021
1 parent 08d9a66 commit 78306b9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
name: build
on: [push, pull_request]
jobs:
build:
name: build
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ribbybibby/ssl-exporter
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build .
- name: Set up Go
uses: actions/setup-go@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ metric indicates if the probe has been successful.
### Release process

- Update the `VERSION` file in this repository and commit to master
- [This github action](.github/workflows/release.yaml) will add a changelog and
upload binaries in response to a release being created in Github
- Dockerhub will build and tag a new container image in response to tags of the
format `/^v[0-9.]+$/`
- Create a release in Github prefixed with `v` and GH actions will:
- Add a changelog
- Upload binaries
- Build and push a Docker image

## Usage

Expand Down

0 comments on commit 78306b9

Please sign in to comment.