Update PR on upstream icons changes #1281
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: Update PR on upstream icons changes | |
on: | |
push: | |
paths: | |
- '.github/workflows/open-pr-on-icons-changes.yaml' | |
schedule: | |
- cron: '8 0 * * *' | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
refresh-upstream: | |
name: Check for upstream symbolic icons changes | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
buildenv: [ | |
{ | |
project: Adwaita symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/adwaita-icon-theme.git", | |
upstreambranch: master, | |
localbranch: adwaita-symbolics, | |
projectdir: adwaita-icon-theme, | |
src: Adwaita/symbolic, | |
dest: icons/upstream/adwaita-symbolics.list | |
}, | |
{ | |
project: Libhandy symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/libhandy.git", | |
upstreambranch: main, | |
localbranch: libhandy-symbolics, | |
projectdir: libhandy, | |
src: src/icons/scalable, | |
dest: icons/upstream/libhandy-symbolics.list | |
}, | |
{ | |
project: Libadwaita symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/libadwaita.git", | |
upstreambranch: main, | |
localbranch: libadwaita-symbolics, | |
projectdir: libadwaita, | |
src: src/icons/scalable, | |
dest: icons/upstream/libadwaita-symbolics.list | |
}, | |
# GNOME Apps pre-installed on ubuntu | |
{ | |
project: baobab symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/baobab.git", | |
upstreambranch: main, | |
localbranch: baobab-symbolics, | |
projectdir: baobab, | |
src: ., | |
dest: icons/upstream/baobab-symbolics.list | |
}, | |
{ | |
project: gnome-characters symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-characters.git", | |
upstreambranch: main, | |
localbranch: gnome-characters-symbolics, | |
projectdir: gnome-characters, | |
src: ., | |
dest: icons/upstream/gnome-characters-symbolics.list | |
}, | |
{ | |
project: simple-scan symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/simple-scan.git", | |
upstreambranch: master, | |
localbranch: simple-scan-symbolics, | |
projectdir: simple-scan, | |
src: ., | |
dest: icons/upstream/simple-scan-symbolics.list | |
}, | |
{ | |
project: evince symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/evince.git", | |
upstreambranch: main, | |
localbranch: evince-symbolics, | |
projectdir: evince, | |
src: ., | |
dest: icons/upstream/evince-symbolics.list | |
}, | |
{ | |
project: eog symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/eog.git", | |
upstreambranch: master, | |
localbranch: eog-symbolics, | |
projectdir: eog, | |
src: ., | |
dest: icons/upstream/eog-symbolics.list | |
}, | |
{ | |
project: gnome-calendar symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-calendar.git", | |
upstreambranch: main, | |
localbranch: gnome-calendar-symbolics, | |
projectdir: gnome-calendar, | |
src: ., | |
dest: icons/upstream/gnome-calendar-symbolics.list | |
}, | |
{ | |
project: gnome-screenshot symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-screenshot.git", | |
upstreambranch: master, | |
localbranch: gnome-screenshot-symbolics, | |
projectdir: gnome-screenshot, | |
src: ., | |
dest: icons/upstream/gnome-screenshot-symbolics.list | |
}, | |
{ | |
project: gnome-software symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-software.git", | |
upstreambranch: main, | |
localbranch: gnome-software-symbolics, | |
projectdir: gnome-software, | |
src: ., | |
dest: icons/upstream/gnome-software-symbolics.list | |
}, | |
{ | |
project: gnome-system-monitor symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-system-monitor.git", | |
upstreambranch: master, | |
localbranch: gnome-system-monitor-symbolics, | |
projectdir: gnome-system-monitor, | |
src: ., | |
dest: icons/upstream/gnome-system-monitor-symbolics.list | |
}, | |
{ | |
project: gnome-todo symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-todo.git", | |
upstreambranch: main, | |
localbranch: gnome-todo-symbolics, | |
projectdir: gnome-todo, | |
src: ., | |
dest: icons/upstream/gnome-todo-symbolics.list | |
}, | |
{ | |
project: gnome-usage symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-usage.git", | |
upstreambranch: main, | |
localbranch: gnome-usage-symbolics, | |
projectdir: gnome-usage, | |
src: ., | |
dest: icons/upstream/gnome-usage-symbolics.list | |
}, | |
{ | |
project: gnome-control-center symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/gnome-control-center.git", | |
upstreambranch: main, | |
localbranch: gnome-control-center-symbolics, | |
projectdir: gnome-control-center, | |
src: ., | |
dest: icons/upstream/gnome-control-center-symbolics.list | |
}, | |
{ | |
project: shotwell symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/shotwell.git", | |
upstreambranch: master, | |
localbranch: shotwell-symbolics, | |
projectdir: shotwell, | |
src: ., | |
dest: icons/upstream/shotwell-symbolics.list | |
}, | |
{ | |
project: yelp symbolics, | |
repo: "https://gitlab.gnome.org/GNOME/yelp.git", | |
upstreambranch: master, | |
localbranch: yelp-symbolics, | |
projectdir: yelp, | |
src: ., | |
dest: icons/upstream/yelp-symbolics.list | |
}, | |
] | |
steps: | |
# Checkout code | |
- uses: actions/checkout@v4 | |
- name: Download from ${{ matrix.buildenv.repo }}, on branch ${{ matrix.buildenv.upstreambranch }} | |
id: checknewupstream | |
run: | | |
hasModif="false" | |
pushd /tmp | |
git clone --branch ${UPSTEAM_BRANCH} --depth 1 ${UPSTREAM_REPO_URL} | |
popd | |
rm -f ${DEST} | |
cd /tmp/${PROJECT_DIR}/${SRC} | |
find . -name "*-symbolic.svg" | sort > list.list | |
cd ~/work/yaru/yaru | |
cp /tmp/${PROJECT_DIR}/${SRC}/list.list ${DEST} | |
MODIFIED=$(git status --porcelain) | |
if [ -n "$MODIFIED" ]; then | |
hasModif="true" | |
fi | |
echo "::set-output name=modified::${hasModif}" | |
env: | |
UPSTREAM_REPO_URL: ${{ matrix.buildenv.repo }} | |
UPSTEAM_BRANCH: ${{ matrix.buildenv.upstreambranch }} | |
SRC: ${{ matrix.buildenv.src }} | |
DEST: ${{ matrix.buildenv.dest }} | |
PROJECT_DIR: ${{ matrix.buildenv.projectdir }} | |
- name: Create or update Pull Request | |
if: steps.checknewupstream.outputs.modified == 'true' | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: New upstream symbolic icons list for ${{ matrix.buildenv.project }} | |
title: Auto update new upstream symbolic icons list for ${{ matrix.buildenv.project }} | |
labels: automated pr, new upstream | |
body: "[New upstream ${{ matrix.buildenv.project }} symbolic icons changes](https://github.com/ubuntu/yaru/actions?query=workflow%3A%22Update+PR+on+upstream+symbolic+icons+changes%22) by GitHub Action" | |
branch: upstream-${{ matrix.buildenv.localbranch }}-update | |
token: ${{ secrets.GITHUB_TOKEN }} |