-
Notifications
You must be signed in to change notification settings - Fork 30
45 lines (40 loc) · 1.23 KB
/
build_debian_docker.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "🐳 Build Debian Docker image"
on:
workflow_dispatch:
schedule:
- cron: "04 05 * * 6" # every Saturday at 05:04
push:
branches:
- master
paths:
- "docker_build/debian_docker/**"
- ".github/workflows/build_debian_docker.yml"
jobs:
build:
runs-on: [ self-hosted, linux ]
permissions:
contents: read
packages: write
env:
job_path: "build_debian_docker"
dockerfile_folder_path: "docker_build/debian_docker"
image_url_base: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}"
image_tag: "debian_docker:latest"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.job_path }}
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.image_url_base }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: "${{ env.job_path }}/${{ env.dockerfile_folder_path }}"
push: true
tags: "${{ env.image_url_base }}/${{ env.image_tag }}"