diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..243db17 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,30 @@ +name: Build profile +on: [push] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: | + mkdir -p ~/.ssh + eval $(ssh-agent -s) + echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | ssh-add - + echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - run: | + git config --global user.email ci@gitnet.fr + git config --global user.name CI + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: | + cp README.tpl.md README.md + ./bin/rss -f https://www.deblan.io/RSS | head --lines=10 >> README.md + - run: | + git status + git add . + git commit -m "Build ${{ gitea.job }}" || true + git remote add repo git@gitnet.fr:deblan/.profile.git + #git push repo main || true + diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 0915f2f..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,34 +0,0 @@ -steps: - update_profile: - image: alpine/git - secrets: [ssh_priv_key] - commands: - - git config --global user.email ci@gitnet.fr - - git config --global user.name CI - - apk add wget - - cp README.tpl.md README.md - - ./bin/rss -f https://www.deblan.io/RSS | head -n 10 >> README.md - - git status - - git add . - - git commit -m "Build ${CI_BUILD_NUMBER}" || true - - mkdir -p ~/.ssh - - eval $(ssh-agent -s) - - echo "$SSH_PRIV_KEY" | tr -d '\r' | ssh-add - - - 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - - git remote add repo git@gitnet.fr:deblan/.profile.git - - git push repo main || true - when: - event: [deployment, cron] - - # deploy: - # image: appleboy/drone-git-push - # commands: - # settings: - # branch: main - # remote: git@gitnet.fr:deblan/.profile.git - # force: false - # commit: false - # ssh_key: - # from_secret: ssh_priv_key - # when: - # event: [push, deployment, cron] diff --git a/bin/rss b/bin/rss index e5fdf94..d81247e 100755 --- a/bin/rss +++ b/bin/rss @@ -1,7 +1,6 @@ #!/bin/sh set -eu -set -x usage() { printf "Usage: %s [-l DEBUG_LEVEL] [-f URL] [-h]\n" "$0"