-
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.27 KB
/
docker.yml
File metadata and controls
48 lines (43 loc) · 1.27 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
name: Docker Image
on:
push:
branches:
- develop
- main
paths:
- 'iso/Dockerfile'
- 'iso/build.sh'
- 'iso/profile/packages.x86_64'
schedule:
- cron: '0 3 * * 0' # Weekly refresh every Sunday at 3 AM UTC
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_TOKEN }}
- name: Build and push Docker image
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_USER: ${{ github.repository_owner }}
run: |
cd ./iso && chmod +x build.sh
./build.sh --docker --yes
- name: Push tagged version
if: github.ref_type == 'tag'
run: |
docker tag retrolinux-build:latest ghcr.io/${{ github.repository_owner }}/retrolinux-build:${{ github.ref_name }}
docker push ghcr.io/${{ github.repository_owner }}/retrolinux-build:${{ github.ref_name }}