Skip to content

revert create-pull-request author/committer change #300

revert create-pull-request author/committer change

revert create-pull-request author/committer change #300

Workflow file for this run

name: Build
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
tags:
- "*"
schedule:
- cron: "0 0 1 * *"
permissions: write-all
jobs:
build:
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
include:
- os: ubuntu-22.04
ubuntu: jammy
- os: ubuntu-24.04
ubuntu: noble
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build packages
run: DOCKER_BUILDKIT=1 docker build --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --output binaries .
- name: List packages
run: ls -lah binaries
- name: Install packages
run: |
sudo apt-get update
sudo apt install ./binaries/libde265_*.deb
sudo apt install -y ./binaries/libheif_*.deb
sudo apt install -y ./binaries/imagemagick_*.deb
- name: magick --version
run: magick --version
- name: magick -list format
run: magick -list format
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
if: contains(github.ref, 'tags')
with:
subject-path: 'binaries/*'
- name: Archive binary artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.ubuntu }}
path: binaries
- name: Upload binaries to GitHub Release
if: contains(github.ref, 'tags')
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: actions/checkout@v4
if: github.event_name == 'pull_request' && matrix.ubuntu == 'noble'
with:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false
fetch-depth: 0
- name: Update README
if: github.event_name == 'pull_request' && matrix.ubuntu == 'noble'
run: |
sed -i '/#### Example Output/q' ./README.md
echo '```sh' >> README.md
echo '$ magick --version' >> README.md
magick --version >> README.md
echo '' >> README.md
echo '$ magick -list format' >> README.md
magick -list format >> README.md
echo '```' >> README.md
- name: Commit README update
if: github.event_name == 'pull_request' && matrix.ubuntu == 'noble'
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff-index --quiet HEAD || git commit -m "Update README [skip ci]" && echo "push_readme=true" >> $GITHUB_ENV
- name: Push README update to Pull Request
if: env.push_readme && matrix.ubuntu == 'noble'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}