Docker Images #673
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 Images | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- master | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
ghcr: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- | |
name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- | |
name: Build GHCR images | |
env: | |
DOCKER_REPO: ghcr.io/efrecon/mosquitto | |
SOURCE_COMMIT: ${{ github.sha }} | |
run: ./hooks/build | |
- | |
name: Push GHCR images | |
env: | |
DOCKER_REPO: ghcr.io/efrecon/mosquitto | |
SOURCE_COMMIT: ${{ github.sha }} | |
run: ./hooks/push | |
hub: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- | |
name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build Docker Hub images | |
env: | |
DOCKER_REPO: docker.io/efrecon/mosquitto | |
SOURCE_COMMIT: ${{ github.sha }} | |
run: ./hooks/build | |
- | |
name: Push Docker Hub images | |
env: | |
DOCKER_REPO: docker.io/efrecon/mosquitto | |
SOURCE_COMMIT: ${{ github.sha }} | |
run: ./hooks/push | |
- | |
# Note: This uses the password, not the token as this action would | |
# otherwise not work. | |
name: Update repo description at Docker Hub | |
uses: peter-evans/dockerhub-description@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
repository: efrecon/mosquitto | |
short-description: Easily configurable eclipse MQTT broker |