rust/.forgejo/workflows/build-image.yml

27 lines
739 B
YAML
Raw Normal View History

on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
build:
2025-01-10 21:12:04 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout
2025-01-10 20:27:27 +00:00
uses: actions/checkout@v4
- 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
docker system prune --force --all
- name: Build
2025-01-12 19:01:58 +00:00
run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest
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
- name: Publish
2025-01-12 19:01:58 +00:00
run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest