Create LICENSE #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: polctl | |
on: | |
push: | |
tags: ['*'] | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
registry: docker.io | |
username: weaveworkstimberwolfci | |
password: ${{ secrets.DOCKERHUB_TOKEN_WEAVEWORKSTIMBERWOLFCI }} | |
- name: Build docker image | |
run: docker build . | |
- name: Push docker image | |
# push image only when a new tag is pushed | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
run: | | |
docker build . -t weaveworks/polctl:${GITHUB_REF/refs\/tags\//} | |
docker push weaveworks/polctl:${GITHUB_REF/refs\/tags\//} | |