-
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.39 KB
/
BuildImage.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
name: Picons Builder
on:
schedule:
- cron: '20 17 * * 3'
workflow_dispatch:
jobs:
picons_builder:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Build image
run: |
docker build --no-cache -t ghcr.io/linuxserver/picons-builder:latest .
- name: Tag image
if: ${{ github.ref == format('refs/heads/master') }}
run: |
docker tag ghcr.io/linuxserver/picons-builder:latest ghcr.io/linuxserver/picons-builder:$(date +%F)
- name: Login to GitHub Container Registry
if: ${{ github.ref == format('refs/heads/master') }}
run: |
echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ secrets.CR_USER }} --password-stdin
- name: Push tags to GitHub Container Registry
if: ${{ github.ref == format('refs/heads/master') }}
run: |
docker push ghcr.io/linuxserver/picons-builder:$(date +%F)
docker push ghcr.io/linuxserver/picons-builder:latest
- name: Generate Repo Activity
if: ${{ github.ref == format('refs/heads/master') }}
run: |
sed -i -r "s|^[0-9]{4}-[0-9]{2}-[0-9]{2}|$(date +%F)|" last_pushed.md
git config --local user.email "[email protected]"
git config --local user.name "LinuxServer-CI"
git add . || :
git commit -m '[bot] Updating push date' || :
git push || :