-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (45 loc) · 1.55 KB
/
docker-publish.yml
File metadata and controls
56 lines (45 loc) · 1.55 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
50
51
52
53
54
55
56
name: Docker Publish Latest
on:
workflow_call:
workflow_dispatch:
env:
APP_NAME: subsonic-player
jobs:
metadata:
uses: ./.github/workflows/compute-build-metadata.yml
with:
version_policy: release
deploy:
needs: metadata
runs-on: ubuntu-latest
steps:
- name: Checkout branch 🛎
uses: actions/checkout@v6
- name: Get Node version 📋
id: node-version
run: echo "version=$(cat .nvmrc)" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx 🏗
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub 🔐
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU 🖥️
uses: docker/setup-qemu-action@v4
- name: Build and push Docker image 📦
uses: docker/build-push-action@v7
with:
context: .
push: true
build-args: |
NODE_VERSION=${{ steps.node-version.outputs.version }}
APP_RELEASE_DATE=${{ needs.metadata.outputs.app_release_date }}
APP_VERSION=${{ needs.metadata.outputs.app_version }}
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}:latest
- name: Update Docker description 📝
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}