Skip to content

Commit 54b4bf7

Browse files
authored
Merge pull request #106 from ChannelFinder/builddockerpush
Add upload of docker image
2 parents 44d3eb1 + 601a97e commit 54b4bf7

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/docker.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release docker image
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
paths:
7+
- server/**
8+
tags:
9+
- '**'
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: recceiver
14+
15+
jobs:
16+
build-and-push-image:
17+
permissions:
18+
contents: read
19+
packages: write
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: server
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Log in to the Container registry
27+
uses: docker/login-action@v3
28+
with:
29+
registry: ${{ env.REGISTRY }}
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
- name: Build and push Docker image
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: .
43+
push: true
44+
platforms: linux/amd64,linux/arm64
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
47+
cache-from: type=gha
48+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)