Skip to content

Update locale slackbuilds #441

Update locale slackbuilds

Update locale slackbuilds #441

---
name: "Update locale slackbuilds"
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
concurrency: locale-pr-generator
jobs:
update-locale-slackbuilds:
timeout-minutes: 10
name: Update locale slackbuilds.
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: Set environment variables
run: |
{
curl -s -f https://slackware.osuosl.org/slackware64-current/ChangeLog.txt -o ChangeLog.txt
printf 'FFVERSION=%s\n' "$(sed -n '/mozilla-firefox/p' ChangeLog.txt | sed -n 1p | cut -d' ' -f1 | cut -d/ -f2 | sed 's/://' | rev | cut -f3 -d- | rev)"
printf 'TBVERSION=%s\n' "$(sed -n '/mozilla-thunderbird/p' ChangeLog.txt | sed -n 1p | cut -d' ' -f1 | cut -d/ -f2 | sed 's/://' | rev | cut -f3 -d- | rev)"
grep ^SMVERSION= .github/scripts/genlocaleslackbuilds
rm ChangeLog.txt
} >> "$GITHUB_ENV"
- name: Install dependencies
run: |
sudo apt-get install lftp
- name: Generate updates
run: |
sed -i "s/^FFVERSION.*/FFVERSION=${{ env.FFVERSION }}/g" ./.github/scripts/genlocaleslackbuilds
sed -i "s/^TBVERSION.*/TBVERSION=${{ env.TBVERSION }}/g" ./.github/scripts/genlocaleslackbuilds
sed -i "s/^SMVERSION.*/SMVERSION=${{ env.SMVERSION }}/g" ./.github/scripts/genlocaleslackbuilds
./.github/scripts/genlocaleslackbuilds network
git checkout ./.github/scripts/genlocaleslackbuilds
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add network/mozilla-firefox-* || true
git commit -m 'network/mozilla-firefox-l10n-*: Updated for version ${{ env.FFVERSION }}.' || true
git add network/mozilla-thunderbird-* || true
git commit -m 'network/mozilla-thunderbird-l10n-*: Updated for version ${{ env.TBVERSION }}.' || true
git add network/seamonkey-* || true
git commit -m 'network/seamonkey-l10n-*: Updated for version ${{ env.SMVERSION }}.' || true
- name: Create Pull Request
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "[auto] Update locale slackbuilds based on latest ChangeLog.txt."
branch: autoupdate-locale-slackbuilds
body: |
Locale updates:
- Firefox: ${{ env.FFVERSION }}
- Thunderbird: ${{ env.TBVERSION }}
- Seamonkey: ${{ env.SMVERSION }}