Build container #8
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 container | |
on: | |
workflow_dispatch: # build on demand | |
release: | |
types: [published] # build on release | |
schedule: | |
- cron: '45 4 * * 3' # 4:45am on Wednesday UTC | |
jobs: | |
build-jekyll: | |
runs-on: ubuntu-latest # use the GitHub hosted runners | |
permissions: | |
packages: write # for uploading the finished container | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
id-token: write # to complete the identity challenge with sigstore/fulcio when running outside of PRs | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ghcr.io | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
file: ./Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/some-natalie/jekyll-in-a-can:latest |