-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (72 loc) · 1.85 KB
/
build.yaml
File metadata and controls
76 lines (72 loc) · 1.85 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: build
# ---------------
# Control secrets
# ---------------
#
# At the GitHub 'organisation' or 'project' level you are expected to
# have the following GitHub 'Repository Secrets' defined
# (i.e. via 'Settings -> Secrets'): -
#
# (none)
#
# -----------
# Environment (GitHub Environments)
# -----------
#
# (none)
on:
push:
branches:
- '*'
tags-ignore:
- '*'
schedule:
# Build every Sunday (0) at 4:45pm
- cron: '45 16 * * 0'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run pre-commit (all files)
run: |
pip install --no-cache-dir poetry=='1.8.5'
poetry install --no-root --no-directory --with dev
poetry run pre-commit run --all-files
build:
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v5
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set lower case owner name
run: echo "owner=${OWNER,,}" >> "$GITHUB_ENV"
env:
OWNER: '${{ github.repository_owner }}'
- name: Build and Push (Latest)
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ env.owner }}/squonk2-fastapi-ws-event-stream:latest
push: true