Update recipes #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Image for cache | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '13 5 * * 1' | |
push: | |
paths: | |
- ".github/workflows/build-image.yaml" | |
- ".github/docker/**" | |
branches: | |
- "1.21.2" | |
permissions: | |
contents: read | |
packages: write | |
env: | |
branch: "1.21.2" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: ghcr.io/kotori316/quarry-cache:${{ env.branch }} | |
platforms: linux/amd64 | |
context: '.github/docker' | |
file: '.github/docker/Dockerfile' | |
provenance: false | |
build-args: | | |
branch=${{ env.branch }} | |
delete_old: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: | |
- build | |
steps: | |
- name: Get script | |
run: curl -LO https://raw.githubusercontent.com/Kotori316/fictional-meme/master/clean_container.py | |
- name: Install Python dependencies | |
run: python3 -m pip install requests | |
- name: Clean containers | |
run: python3 ./clean_container.py | |
env: | |
USER_NAME: Kotori316 | |
PACKAGE_NAME: quarry-cache | |
TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }} |