Update Firefox Addons #530
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 Firefox Addons | |
"on": | |
schedule: | |
# Run every day at 00:30, giving the flake update action time to complete. | |
- cron: "30 0 * * *" | |
workflow_dispatch: | |
jobs: | |
update-addons: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v26 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup binary cache | |
uses: cachix/cachix-action@v14 | |
with: | |
name: seadome | |
extraPullNames: dotfield,nix-community | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
- name: Update Firefox addons | |
run: | | |
nix develop .#ci --print-build-logs --verbose --command \ | |
mozilla-addons-to-nix ./src/addons.json ./src/addons.generated.nix | |
# TODO: build all <https://github.com/NixOS/nix/issues/7165> | |
# <https://git.sr.ht/~rycee/nur-expressions/tree/master/item/ci.nix> | |
# - name: 'Build addons packages' | |
# run: mozilla-addons-to-nix ./src/addons.json | |
# ./src/addons.generated.nix | |
# <https://github.com/marketplace/actions/create-pull-request> | |
- name: Commit and create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "chore(deps:addons): update addons" | |
title: "Update Firefox addons" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
body: | | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: | | |
automated | |
scope:deps | |
scope:deps:addons | |
- name: Check outputs | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable pull request automerge | |
run: gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |