2021-07-15 03:03:08 +02:00
|
|
|
name: Build Docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- current
|
|
|
|
paths:
|
|
|
|
- requirements.txt
|
|
|
|
- Dockerfile
|
|
|
|
- .github/workflows/docker.yml
|
|
|
|
|
2021-10-23 21:57:26 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
|
|
|
|
2021-07-15 03:03:08 +02:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
2024-05-19 01:21:53 +02:00
|
|
|
name: Install pagefind
|
2024-05-20 09:33:51 +02:00
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.12.0
|
2024-05-19 01:21:53 +02:00
|
|
|
with:
|
|
|
|
repo: cloudcannon/pagefind
|
|
|
|
-
|
2021-07-15 03:03:08 +02:00
|
|
|
name: Checkout source code
|
2024-06-13 08:14:55 +02:00
|
|
|
uses: actions/checkout@v4.1.7
|
2024-02-24 13:00:42 +01:00
|
|
|
-
|
|
|
|
name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
2021-07-15 03:03:08 +02:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2023-10-11 02:04:14 +02:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2021-07-15 03:03:08 +02:00
|
|
|
-
|
|
|
|
name: Login to DockerHub
|
2023-10-11 02:06:10 +02:00
|
|
|
uses: docker/login-action@v3
|
2021-07-15 03:03:08 +02:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2021-07-15 03:24:36 +02:00
|
|
|
- name: Login to GitHub Container Registry
|
2023-10-11 02:06:10 +02:00
|
|
|
uses: docker/login-action@v3
|
2021-07-15 03:24:36 +02:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-15 03:03:08 +02:00
|
|
|
-
|
|
|
|
name: Build and push
|
|
|
|
id: docker_build
|
2024-06-18 07:47:52 +02:00
|
|
|
uses: docker/build-push-action@v6
|
2021-07-15 03:03:08 +02:00
|
|
|
with:
|
2021-07-15 03:11:57 +02:00
|
|
|
context: .
|
2021-07-15 03:03:08 +02:00
|
|
|
push: true
|
2024-02-24 13:00:42 +01:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-07-15 03:24:36 +02:00
|
|
|
tags: |
|
|
|
|
esphome/esphome-docs:latest
|
|
|
|
ghcr.io/esphome/esphome-docs:latest
|
|
|
|
cache-from: ghcr.io/esphome/esphome-docs:latest
|