2025-01-09 17:26:55 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '30 1 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2025-01-10 21:12:04 +00:00
|
|
|
runs-on: ubuntu-latest
|
2025-01-09 17:26:55 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2025-01-10 20:27:27 +00:00
|
|
|
uses: actions/checkout@v4
|
2025-01-09 17:26:55 +00:00
|
|
|
|
2025-01-11 18:23:57 +00:00
|
|
|
- name: Clear image from cache
|
|
|
|
run: |
|
2025-01-12 19:01:58 +00:00
|
|
|
docker images git.kemitix.net/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force
|
2025-01-11 18:23:57 +00:00
|
|
|
docker system prune --force --all
|
|
|
|
|
2025-01-09 17:26:55 +00:00
|
|
|
- name: Build
|
2025-01-12 19:01:58 +00:00
|
|
|
run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest
|
2025-01-09 17:26:55 +00:00
|
|
|
|
2025-01-11 08:15:40 +00:00
|
|
|
- name: Login
|
2025-01-12 19:15:15 +00:00
|
|
|
run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }}
|
2025-01-11 08:15:40 +00:00
|
|
|
|
2025-01-09 17:26:55 +00:00
|
|
|
- name: Publish
|
2025-01-12 19:01:58 +00:00
|
|
|
run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest
|