Skip to content

Commit 752cf03

Browse files
committed
Add Github Actions for publish container image
1 parent 472ab91 commit 752cf03

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
container_release:
10+
name: Container Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Docker meta
16+
id: meta
17+
uses: docker/metadata-action@v3
18+
with:
19+
images: ghcr.io/ecoppen/futuresboard
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v1
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v1
24+
- name: Login to GitHub Container Registry
25+
uses: docker/login-action@v1
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.ACTIONS_TOKEN }}
30+
- name: Build and push
31+
id: docker_build
32+
uses: docker/build-push-action@v2
33+
with:
34+
context: .
35+
file: ./Dockerfile
36+
platforms: linux/amd64,linux/arm64
37+
build-args: |
38+
VERSION=${{github.ref_name}}
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}
41+
push: ${{ github.event_name != 'pull_request' }}

Dockerfile

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
FROM python:3.8-buster
22

3-
WORKDIR /usr/src
4-
RUN git clone https://github.com/ecoppen/futuresboard.git
3+
LABEL maintainer="ecoppen" \
4+
org.opencontainers.image.url="https://github.com/ecoppen/futuresboard" \
5+
org.opencontainers.image.source="https://github.com/ecoppen/futuresboard" \
6+
org.opencontainers.image.vendor="ecoppen" \
7+
org.opencontainers.image.title="futuresboard" \
8+
org.opencontainers.image.description="Dashboard to monitor the performance of your Binance or Bybit Futures account" \
9+
org.opencontainers.image.licenses="GPL-3.0"
10+
511
WORKDIR /usr/src/futuresboard
12+
COPY . .
613
RUN python -m pip install .
714

815
CMD futuresboard

0 commit comments

Comments
 (0)