Skip to content

Update branch with updated submodule on libjxl #154

Update branch with updated submodule on libjxl

Update branch with updated submodule on libjxl #154

# Copyright (c) the JPEG XL Project Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Workflow for building and running tests.
name: Update branch with updated submodule on libjxl
on:
workflow_dispatch:
schedule:
- cron: '37 2 * * *' # Daily on 02:37 UTC
permissions:
contents: read
jobs:
update:
if: github.repository_owner == 'libjxl'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: 'Cloning libjxl'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
persist-credentials: false # otherwise, the wrong auhtentication is used in the push
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Pull & update highway
working-directory: ./third_party/highway
run: |
git fetch origin
git checkout origin/master
- name: Update deps.sh
run: |
NEWHASH=`git submodule status third_party/highway | cut -d' ' -f1 | cut -c2-`
sed -i "s/\(THIRD_PARTY_HIGHWAY=\"\)[^\"]*/\1$NEWHASH/" deps.sh
- name: Commit
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions - update submodules"
git add --all
git commit -m "Update highway submodule" || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0
with:
github_token: ${{ secrets.TOKEN }}
branch: 'refs/heads/test_highway'
force: true