(fix) dont rescope url #165
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: Docker build & Push | |
on: | |
push: | |
branches: [master] | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: Publish latest tag to Github Repo (only on master branch push) | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
with: | |
image: gowitness | |
addLatest: true | |
tags: latest | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: Publish latest and version tag to Github Repo (only on tag event) | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
with: | |
image: gowitness | |
addLatest: true | |
tags: ${{ steps.get_version.outputs.VERSION }}, latest | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: Publish latest tag to Docker Repo (only on master branch push) | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
with: | |
image: leonjza/gowitness | |
addLatest: true | |
tags: latest | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: mr-smithers-excellent/docker-build-push@v5 | |
name: Publish latest and version tag to Docker Repo (only on tag event) | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
with: | |
image: leonjza/gowitness | |
addLatest: true | |
tags: ${{ steps.get_version.outputs.VERSION }}, latest | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} |