Build Builder #74
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 Builder | |
on: | |
schedule: | |
- cron: '0 0 * * 0' # build every sunday night | |
workflow_dispatch: # Allow this workflow to be triggered manually | |
env: | |
IMAGE_NAME_BUILDER: chatterbox-builder | |
jobs: | |
build-and-push-builder: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push builder-image | |
uses: docker/build-push-action@v3 | |
with: | |
file: 'scripts/Dockerfile.builder' | |
context: scripts | |
push: true | |
tags: ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME_BUILDER }}:latest | |
labels: ${{ env.IMAGE_NAME_BUILDER }} |