mirror of
https://github.com/ribbybibby/ssl_exporter.git
synced 2024-11-27 08:31:02 +02:00
actions: push to Docker Hub
This commit is contained in:
parent
08d9a665b6
commit
78306b97c9
28
.github/workflows/build.yaml
vendored
28
.github/workflows/build.yaml
vendored
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user