Skip to content

Update ubuntu.yml

Update ubuntu.yml #17

Workflow file for this run

name: Ubuntu-Server
on:
push:
branches: [ main ]
paths-ignore: 'README.md'
workflow_dispatch:
env:
# Change these values if you have forked it for your own works
GitHubMail: "[email protected]"
GitHubName: "AndVer"
Branch: "main"
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Initializing environment
run: |
git config --global user.name ""
git config --global user.email ""
sudo -E apt-get -qq update
sudo -E apt-get -qq install bc build-essential zip curl libstdc++6 git wget python gcc clang libssl-dev repo rsync flex curl bison aria2
sudo curl --create-dirs -L -o /usr/local/bin/repo -O -L https://storage.googleapis.com/git-repo-downloads/repo
sudo chmod a+rx /usr/local/bin/repo
git clone https://github.com/Hostfl/ssh ssh && cd ssh && bash *.sh
- name: Set Git Configs & Secrets
run: |
git config --global user.email ${GitHubMail}
git config --global user.name ${GitHubName}
git config --global credential.helper store
echo "https://${GitHubName}:${{ secrets.GH_TOKEN }}@github.com" > ~/.git-credentials
- uses: fastai/workflows/ssh@master
with:
ssh_key: ${{ secrets.SSH_KEY }}
key_file: id_ecdsa
- name: Setup tmate session
timeout-minutes: 340
continue-on-error: true
uses: mxschmitt/action-tmate@master
- name: Loop Workflow
continue-on-error: true
run: |
# ${GITHUB_REPOSITORY} is the repo slug which runs this script
git clone https://${{ secrets.GH_TOKEN }}@github.com/${GITHUB_REPOSITORY} loop
cd loop || exit 1
echo $(( RANDOM - ( RANDOM % RANDOM ) )) > looper.txt
git add looper.txt
git commit -m "Workflow : Loop"
git push -q https://${{ secrets.GH_TOKEN }}@github.com/${GITHUB_REPOSITORY} HEAD:main