Update build-doc-and-os.yml
This commit is contained in:
parent
29cc68f434
commit
7618f96dba
32
.github/workflows/build-doc-and-os.yml
vendored
32
.github/workflows/build-doc-and-os.yml
vendored
@ -36,12 +36,12 @@ jobs:
|
|||||||
pip install sphinxemoji sphinx_rtd_theme recommonmark
|
pip install sphinxemoji sphinx_rtd_theme recommonmark
|
||||||
cd docsource
|
cd docsource
|
||||||
make html && make github && cd ..
|
make html && make github && cd ..
|
||||||
|
|
||||||
- name: Check if there are any changes
|
- name: Check if there are any changes
|
||||||
id: verify_diff
|
id: verify_diff
|
||||||
run: |
|
run: |
|
||||||
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
|
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: push docs
|
- name: push docs
|
||||||
if: steps.verify_diff.outputs.changed == 'true'
|
if: steps.verify_diff.outputs.changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
@ -75,10 +75,11 @@ jobs:
|
|||||||
user: inky
|
user: inky
|
||||||
commands: |
|
commands: |
|
||||||
cd /home
|
cd /home
|
||||||
echo 'ALL ALL=(ALL:ALL) PASSWD: ALL' | sudo tee -a /etc/sudoers.d/010_require_sudo_password
|
|
||||||
sudo useradd -m -p "$(openssl passwd -1 $INKY_INITAL_PASSWORD)" inky
|
sudo useradd -m -p "$(openssl passwd -1 $INKY_INITAL_PASSWORD)" inky
|
||||||
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi inky
|
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi inky
|
||||||
su - inky
|
sudo su inky
|
||||||
|
echo $HOME
|
||||||
|
whoami
|
||||||
cd /home/inky
|
cd /home/inky
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
python --version
|
python --version
|
||||||
@ -96,14 +97,29 @@ jobs:
|
|||||||
cd inkycal/tests
|
cd inkycal/tests
|
||||||
wget https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/tests/settings.json
|
wget https://raw.githubusercontent.com/aceinnolab/Inkycal/assets/tests/settings.json
|
||||||
for f in *.py; do python3 "$f"; done
|
for f in *.py; do python3 "$f"; done
|
||||||
sudo chown -R inky:inky /home/inky/Inkycal
|
|
||||||
|
# enable SPI
|
||||||
sudo sed -i s/#dtparam=spi=on/dtparam=spi=on/ /boot/config.txt
|
sudo sed -i s/#dtparam=spi=on/dtparam=spi=on/ /boot/config.txt
|
||||||
|
|
||||||
|
# enable inkycal start at boot
|
||||||
|
sudo -u inky bash -c 'echo "@reboot sleep 60 && cd /home/inky/Inkycal && venv/bin/python inky_run.py &" | crontab -'
|
||||||
|
sudo chown inky:crontab /var/spool/cron/crontabs/inky
|
||||||
|
|
||||||
|
# fix permissions of Inkycal folder recursively
|
||||||
|
sudo chown -R inky:inky /home/inky/Inkycal
|
||||||
|
|
||||||
|
# set hostname to inkycal-lite
|
||||||
|
sudo sh -c 'echo "inkycal-lite" > /etc/hostname; hostnamectl set-hostname inkycal-lite; sed -i "s/127.0.1.1.*/127.0.1.1\tinkycal/g" /etc/hosts'
|
||||||
|
|
||||||
|
# make all users require a password for sudo commands (improves security)
|
||||||
|
echo 'ALL ALL=(ALL:ALL) PASSWD: ALL' | sudo tee -a /etc/sudoers.d/010_require_sudo_password
|
||||||
|
history -cw
|
||||||
|
|
||||||
- name: Compress the release image
|
- name: Compress the release image
|
||||||
run: |
|
run: |
|
||||||
mv ${{ steps.build_image.outputs.image }} inkycal_os_lite.img
|
mv ${{ steps.build_image.outputs.image }} inkycal_os_lite.img
|
||||||
xz -0 -T 0 -v inkycal_os_lite.img
|
xz -0 -T 0 -v inkycal_os_lite.img
|
||||||
|
|
||||||
- name: Get latest release version
|
- name: Get latest release version
|
||||||
run: |
|
run: |
|
||||||
export tag="$(curl -s https://api.github.com/repos/aceinnolab/Inkycal/releases/latest | jq -r '.tag_name')"
|
export tag="$(curl -s https://api.github.com/repos/aceinnolab/Inkycal/releases/latest | jq -r '.tag_name')"
|
||||||
@ -117,5 +133,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: ${{ env.version }}
|
tag_name: ${{ env.version }}
|
||||||
files: inkycal_os_lite.img.xz
|
files: inkycal_os_lite.img.xz
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user