toxcore/.github/workflows/docker.yml
iphydf c81038c963
chore: Add sonar-scan analysis on pushes.
We can't run this on pull requests because it needs access to the
`SONAR_TOKEN` secret. Perhaps in the future we can make it a
`pull_request_target` workflow, but then we can't use cmake to initialise
the environment, meaning we need to specify the inputs manually.
2022-01-14 12:38:35 +00:00

30 lines
925 B
YAML

name: docker
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-bootstrapd-docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name == 'push'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Docker Build
run: .github/scripts/tox-bootstrapd-docker local
- name: Push latest image to DockerHub
if: github.event_name == 'push'
run: docker push toxchat/bootstrap-node:latest
- name: Push versioned image to DockerHub
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: docker push toxchat/bootstrap-node:"$(other/print-version)"