Skip to content

🐳 Build Debian Docker image #4

🐳 Build Debian Docker image

🐳 Build Debian Docker image #4

name: "🐳 Build Debian Docker image"
on:
workflow_dispatch:
schedule:
- cron: "04 05 * * 6" # every Saturday at 05:04
jobs:
build:
runs-on: [ self-hosted, linux ]
permissions:
contents: read
packages: write
env:
image_url_base: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}"
steps:
- run: sudo chown -R $(whoami) .
- name: Cleanup runner folder
run: |
rm -rf ./* || true
rm -rf ./.??* || true
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.image_url_base }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: docker_build/debian_docker
push: true
tags: "${{ env.image_url_base }}/debian_docker:latest"