Skip to content

Docker

Docker #107

Workflow file for this run

name: "Docker"
on:
workflow_dispatch:
push:
schedule:
- cron: "0 8 * * 1"
permissions:
contents: read
jobs:
build:
name: "Build (${{ matrix.image }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [fx, php, nodejs, golang, python]
steps:
- name: Checkout
uses: actions/checkout@v6
# Builds into the local Docker daemon, so no export or import step
- name: Build image
run: make build DOCKER_VARIANT=${{ matrix.image }}
- name: Smoke test image
run: make test DOCKER_VARIANT=${{ matrix.image }}
- name: Login to DockerHub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image
if: ${{ github.ref == 'refs/heads/master' }}
run: make push DOCKER_VARIANT=${{ matrix.image }}
docs:
name: "Docs"
needs: build
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: dockette/coder