2021-12-24 00:12:22 +08:00
|
|
|
name: docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
2021-12-24 01:17:56 +08:00
|
|
|
build-bootstrapd-docker:
|
2021-12-24 00:12:22 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-12-24 01:17:56 +08:00
|
|
|
- name: Login to DockerHub
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2021-12-24 00:12:22 +08:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Docker Build
|
2022-01-10 09:17:46 +08:00
|
|
|
run: .github/scripts/tox-bootstrapd-docker local
|
2021-12-24 00:12:22 +08:00
|
|
|
- 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)"
|