-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (27 loc) · 1.14 KB
/
build.yml
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
name: Build CI
on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * 1,3,6"
jobs:
image_builder:
name: Build Image
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and Push Image
run: |
echo "CURRENT_DATE=$(date -u +"%Y%m%d")" >> $GITHUB_ENV
docker build --ulimit memlock=-1:-1 -t ghcr.io/totto16/preseeded-imdb-database:latest . -f ./scripts/Dockerfile --build-arg DEBUG=${{ runner.debug && 'true' || ''}}
docker push ghcr.io/totto16/preseeded-imdb-database:latest
docker image tag "ghcr.io/totto16/preseeded-imdb-database:latest" "ghcr.io/totto16/preseeded-imdb-database:$CURRENT_DATE"
docker push "ghcr.io/totto16/preseeded-imdb-database:$CURRENT_DATE"