Marvin Autobump #659
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: Marvin Autobump | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 */3 * *' | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
env: | |
GIT_AUTHOR_NAME: MarvinHatesOceans | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: MarvinHatesOceans | |
GIT_COMMITTER_EMAIL: [email protected] | |
WORK_BRANCH: bumps | |
AUTO_GIT: true | |
LUET_NOLOCK: true | |
LUET_YES: true | |
TOKEN: ${{ secrets.MARVIN_GITHUB_TOKEN }} | |
GITHUB_PRIVATE_KEY: "${{ secrets.MARVIN_GITHUB_PRIVATE_KEY }}" | |
GITHUB_PUBLIC_KEY: "${{ secrets.MARVIN_GITHUB_PUBLIC_KEY }}" | |
HUB_CREDENTIALS: "${{ secrets.MARVIN_HUB_CREDENTIALS }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- upstream_branch: "master" | |
fork: "[email protected]:auto-maintainers/repository-index.git" | |
upstream_repo: "https://github.com/mocaccinoOS/repository-index" | |
name: "Mocaccino Repository index" | |
- upstream_branch: "master" | |
fork: "[email protected]:auto-maintainers/luet-repo.git" | |
upstream_repo: "https://github.com/Luet-lab/luet-repo" | |
name: "Luet official repository" | |
- upstream_branch: "master" | |
fork: "[email protected]:auto-maintainers/mocaccino-extra.git" | |
upstream_repo: "https://github.com/mocaccinoOS/mocaccino-extra" | |
name: "Mocaccino Extra" | |
# - upstream_branch: "master" | |
# fork: "[email protected]:auto-maintainers/mocaccino-micro.git" | |
# upstream_repo: "https://github.com/mocaccinoOS/mocaccino-micro" | |
# name: "Mocaccino Micro" | |
- upstream_branch: "master" | |
fork: "[email protected]:auto-maintainers/desktop.git" | |
upstream_repo: "https://github.com/mocaccinoOS/desktop" | |
name: "Mocaccino Desktop" | |
# - upstream_branch: "master" | |
# fork: "[email protected]:auto-maintainers/mocaccino-musl-universe.git" | |
# upstream_repo: "https://github.com/mocaccinoOS/mocaccino-musl-universe" | |
# name: "Mocaccino Musl Universe" | |
- upstream_branch: "master" | |
fork: "[email protected]:auto-maintainers/kernel-repo.git" | |
upstream_repo: "https://github.com/mocaccinoOS/kernel-repo" | |
name: "Mocaccino Kernel repository" | |
# - upstream_branch: "master" | |
# fork: "[email protected]:auto-maintainers/mocaccino-stage3.git" | |
# upstream_repo: "https://github.com/mocaccinoOS/mocaccino-stage3" | |
# name: "Mocaccino stage3" | |
steps: | |
- env: | |
HUB_ARGS: "-b ${{ matrix.upstream_branch }}" | |
FORK_REPO: ${{ matrix.fork }} | |
UPSTREAM_REPO: ${{ matrix.upstream_repo }} | |
RESET_BRANCH: ${{ matrix.upstream_branch }} | |
name: Autobump ${{matrix.name}} | |
run: | | |
sudo rm -rf /usr/local/bin/yq | |
sudo apt-get install -y skopeo | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
sudo luet install -y repository/mocaccino-extra | |
sudo luet install -y system/luet-extensions system/luet-devkit utils/jq utils/yq vcs/hub | |
mkdir -p $HOME/.ssh | |
mkdir -p $HOME/.config | |
echo "$GITHUB_PRIVATE_KEY" > $HOME/.ssh/id_rsa | |
echo "$GITHUB_PUBLIC_KEY" > $HOME/.ssh/id_rsa.pub | |
echo "$HUB_CREDENTIALS" > $HOME/.config/hub | |
chmod 700 ~/.ssh | |
chmod 600 ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa.pub | |
git clone $FORK_REPO fork | |
cd fork | |
git remote add upstream $UPSTREAM_REPO | |
git fetch --all | |
git reset --hard upstream/${RESET_BRANCH} | |
git push -fv | |
echo "Removing working branch if present" | |
git branch -D $WORK_BRANCH || true | |
git checkout -b $WORK_BRANCH | |
git reset --hard upstream/${RESET_BRANCH} | |
git push -fv -u origin $WORK_BRANCH | |
make autobump |