Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish docker image #3

Merged
merged 10 commits into from
Jul 24, 2020
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,19 @@ jobs:
- name: Run Code Coverage
run: |
make coverage

publish:
needs: [build]
name: Publish docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/master')
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: containersol/prom-metrics-check
tag_with_ref: true
tag_with_sha: true