Skip to content

ci: add LOS updater #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/lineageos-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Update LineageOS"

on: { schedule: [{ cron: '0 0 * * 0' }], workflow_dispatch }

jobs:
updates:
name: "Update LineageOS"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: cachix/[email protected]
with:
extra_nix_config: "experimental-features = nix-command flakes"
- name: "Set OLD_BUILD_NUMBER variable"
run: echo "OLD_BUILD_NUMBER=$(nix eval -f . --arg configuration '{ flavor = "lineageos"; device = "foo"; androidVersion = 15; }' --raw config.buildNumber)" >> $GITHUB_ENV
# - name: "Fetch latest lineage-18.1 changes"
# run: nix develop -c ./flavors/lineageos/update.sh lineage-18.1
# - name: "Fetch latest lineage-17.1 changes"
# run: nix develop -c ./flavors/lineageos/update.sh lineage-17.1
- name: "Update buildDateTime"
run: date +%s > flavors/lineageos/lineage-22.1/lastUpdated.epoch
- name: "Set NEW_BUILD_DATE_TIME variable"
run: echo "NEW_BUILD_NUMBER=$(nix eval -f . --arg configuration '{ flavor = "lineageos"; device = "foo"; androidVersion = 15; }' --raw config.buildNumber)" >> $GITHUB_ENV
- name: "Create Pull Request"
id: cpr
uses: peter-evans/[email protected]
with:
commit-message: "lineageos: ${{ env.OLD_BUILD_NUMBER }} -> ${{ env.NEW_BUILD_NUMBER }}"
title: "lineageos: ${{ env.OLD_BUILD_NUMBER }} -> ${{ env.NEW_BUILD_NUMBER }}"
branch: "lineageos-${{ env.NEW_BUILD_NUMBER }}"
delete-branch : true
labels: "automated"
- name: "Check outputs"
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"