Skip to content

Commit a92b898

Browse files
committed
ci: docker image release
1 parent c40aece commit a92b898

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
uses: actions/checkout@v5
7575

7676
- name: Docker build
77+
working-directory: web
7778
run: docker build -t remote-switch .
7879

7980
- name: Run container

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [released, prereleased]
6+
7+
jobs:
8+
docker:
9+
runs-on: ubuntu-latest
10+
needs: release
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v3
20+
21+
- name: Build and push Docker image (latest)
22+
uses: docker/build-push-action@v6
23+
if: ${{ !github.event.release.prerelease }}
24+
with:
25+
context: ./web
26+
push: true
27+
tags: |
28+
ghcr.io/matiasg19/arduino-remote-switch:latest
29+
ghcr.io/matiasg19/arduino-remote-switch:${{ github.ref_name }}
30+
labels: ${{ steps.meta.outputs.labels }}
31+
platforms: linux/amd64,linux/arm64
32+
33+
- name: Build and push Docker image (prerelease)
34+
uses: docker/build-push-action@v6
35+
if: ${{ github.event.release.prerelease }}
36+
with:
37+
context: ./web
38+
push: true
39+
tags: |
40+
ghcr.io/matiasg19/arduino-remote-switch:pre
41+
ghcr.io/matiasg19/arduino-remote-switch:${{ github.ref_name }}
42+
labels: ${{ steps.meta.outputs.labels }}
43+
platforms: linux/amd64,linux/arm64
File renamed without changes.

0 commit comments

Comments
 (0)