Skip to content

build-workspace

build-workspace #6

Workflow file for this run

name: build-workspace
on:
schedule:
- cron: "0 0 * * 4" # Thursdays at midnight UTC
push:
workflow_dispatch:
jobs:
push-ghcr:
name: Build and push image
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 512
swap-size-mb: 1024
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
- name: Checkout
uses: actions/checkout@v3
- name: Generate variables
id: vars
run: |
echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
- name: Build image
id: build
uses: redhat-actions/buildah-build@v2
with:
containerfiles: |
./Dockerfile
image: ${{ github.event.repository.name }}
tags: |
latest
stable
${{ github.sha }}
${{ steps.vars.outputs.date }}
oci: true
- name: Push to ghcr
uses: redhat-actions/push-to-registry@v2
id: push
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ github.token }}
extra-args: |
--disable-content-trust