-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 2 KB
/
build-fonts-container.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build Nerd Fonts Container
on:
schedule:
- cron: '0 0 * * 0' # Run weekly at midnight on Sunday
workflow_dispatch: # Allow manual triggers
jobs:
check-and-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Check for new release
id: check-release
run: |
chmod +x ./scripts/check-release.sh
./scripts/check-release.sh
- name: Commit version file
if: steps.check-release.outputs.should_build == 'true'
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add .last_version
git commit -m "Update .last_version to ${{ steps.check-release.outputs.version }}"
git push
- name: Set up Docker Buildx
if: steps.check-release.outputs.should_build == 'true'
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: steps.check-release.outputs.should_build == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to Docker Hub
# if: steps.check-release.outputs.should_build == 'true'
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: steps.check-release.outputs.should_build == 'true'
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}/docker-nerdfonts:latest
ghcr.io/${{ github.repository }}/docker-nerdfonts:${{ steps.check-release.outputs.version }}
# watzon/nerdfonts:latest
# watzon/nerdfonts:${{ steps.check-release.outputs.version }}