-
Notifications
You must be signed in to change notification settings - Fork 66
49 lines (41 loc) · 1.19 KB
/
Copy pathdocker-publish.yml
File metadata and controls
49 lines (41 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Publish Docker Image
on:
push:
branches:
- main
workflow_dispatch:
env:
IMAGE_NAME: wingflow/manimcat
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
docker:
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'docker')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.12.0
- name: Log in to Docker Hub
uses: docker/login-action@v3.4.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5.10.0
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha,format=short
- name: Build and push Docker image
uses: docker/build-push-action@v6.18.0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}