Add .forgejo/workflows/build.yml
Some checks failed
/ update (push) Failing after 2m1s

This commit is contained in:
Ashley Graves 2024-10-13 18:02:44 +00:00
commit ca8d68b182

View file

@ -0,0 +1,69 @@
on:
workflow_dispatch:
push:
schedule:
- cron: "0 6 1 * *"
env:
REGISTRY: git.incest.world
IMAGE_NAME: ${{ github.repository }}
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout client
uses: actions/checkout@v3
with:
repository: git@github.com/owncast/owncast.git
submodules: recursive
path: owncast
ref: develop
- name: Log in to the Container registry
uses: https://git.incest.world/actions/docker-login-action@master
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: https://git.incest.world/actions/docker-metadata-action@master
with:
images: git.incest.world/${{ github.repository }}
- name: Build and push Docker images
uses: https://git.incest.world/actions/docker-build-push-action@master
id: push
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- uses: actions/forgejo-release@v1
with:
token: ${{ github.token }}
direction: upload
release-dir: jami/dist
tag: ${{ steps.date.outputs.date }}
- name: Generate artifact attestation
uses: https://git.incest.world/actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true