-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 1.15 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: deploy
on:
push:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
# Prepare git log message to avoid extra blank lines
- name: Set env message
run: |
GITREPO=`git remote show origin -n | grep h.URL | sed 's/Fetch URL: https:\/\/github.com\/mac-a-r0ni/lxqt\///g'`
GITMSG=`git log -1 --pretty=format:"%s"`
echo "MESSAGE=$(echo "[$GITREPO ]: $GITMSG")" >> $GITHUB_ENV
- name: Update REPO file
run: |
wget -P /tmp -q https://crux.nu/files/httpup-0.5.0.tar.xz
tar -C /tmp -xf /tmp/httpup-0.5.0.tar.xz httpup-0.5.0/httpup-repgen
/tmp/httpup-0.5.0/httpup-repgen
git add REPO
- name: Push to remote
run: |
git config user.name "$(git log -n 1 --pretty=format:%an)"
git config user.email "$(git log -n 1 --pretty=format:%ae)"
bash -c "git commit -a -m '[auto] Update REPO file' && git push || exit 0"