aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/cgitize.yml48
-rw-r--r--.github/workflows/jekyll.yml65
-rw-r--r--.github/workflows/main.yml8
3 files changed, 121 insertions, 0 deletions
diff --git a/.github/workflows/cgitize.yml b/.github/workflows/cgitize.yml
new file mode 100644
index 0000000..24c2e33
--- /dev/null
+++ b/.github/workflows/cgitize.yml
@@ -0,0 +1,48 @@
+name: cgitize
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ maintenance:
+ runs-on: ubuntu-latest
+ name: '${{ matrix.project.repo }}'
+ env:
+ GH_TOKEN: '${{ github.token }}'
+ steps:
+ - name: Configure SSH
+ run: |
+ mkdir -p ~/.ssh
+ cat > ~/.ssh/config <<'EOF'
+ StrictHostKeyChecking no
+ EOF
+ - name: Set up ssh-agent
+ uses: webfactory/ssh-agent@v0.9.0
+ with:
+ ssh-private-key: '${{ secrets.SSH_KEY }}'
+ - name: Checkout
+ run: |
+ git clone -q 'ssh://git@github.com/egor-tensin/cgitize.git'
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version-file: cgitize/.python-version
+ - name: Configure git
+ run: |
+ git config --global user.name 'Egor Tensin'
+ git config --global user.email 'egor@tensin.name'
+ - name: Run maintenance
+ id: maintenance
+ run: |
+ cd cgitize
+ make maintenance
+ commit="$( git rev-parse HEAD )"
+ echo "commit=$commit" >> "$GITHUB_OUTPUT"
+ - name: Wait until the run is finished
+ run: |
+ sleep 10
+ cd cgitize
+ commit='${{ steps.maintenance.outputs.commit }}'
+ run_id="$( gh run list --commit "$commit" --json databaseId --jq '.[0].databaseId' )"
+ gh run watch --compact --exit-status "$run_id"
diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml
new file mode 100644
index 0000000..23a8a1a
--- /dev/null
+++ b/.github/workflows/jekyll.yml
@@ -0,0 +1,65 @@
+name: Jekyll
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ maintenance:
+ strategy:
+ matrix:
+ project:
+ - repo: blog
+ branch: gh-pages
+ - repo: egor-tensin.github.io
+ branch: master
+ - repo: fucktipp.ing
+ branch: master
+ - repo: jekyll-theme
+ branch: master
+ - repo: sorting-algorithms
+ branch: gh-pages
+ - repo: wireguard-config
+ branch: master
+ runs-on: ubuntu-latest
+ name: '${{ matrix.project.repo }}'
+ env:
+ GH_TOKEN: '${{ github.token }}'
+ steps:
+ - name: Configure SSH
+ run: |
+ mkdir -p ~/.ssh
+ cat > ~/.ssh/config <<'EOF'
+ StrictHostKeyChecking no
+ EOF
+ - name: Set up ssh-agent
+ uses: webfactory/ssh-agent@v0.9.0
+ with:
+ ssh-private-key: '${{ secrets.SSH_KEY }}'
+ - name: Checkout
+ run: |
+ git clone -q --single-branch --branch '${{ matrix.project.branch }}' \
+ 'ssh://git@github.com/egor-tensin/${{ matrix.project.repo }}.git'
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ working-directory: '${{ matrix.project.repo }}'
+ - name: Configure git
+ run: |
+ git config --global user.name 'Egor Tensin'
+ git config --global user.email 'egor@tensin.name'
+ - name: Run maintenance
+ id: maintenance
+ run: |
+ cd -- '${{ matrix.project.repo }}'
+ make maintenance
+ commit="$( git rev-parse HEAD )"
+ echo "commit=$commit" >> "$GITHUB_OUTPUT"
+ - name: Wait until the run is finished
+ run: |
+ sleep 10
+ cd -- '${{ matrix.project.repo }}'
+ commit='${{ steps.maintenance.outputs.commit }}'
+ run_id="$( gh run list --commit "$commit" --json databaseId --jq '.[0].databaseId' )"
+ gh run watch --compact --exit-status "$run_id"
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c53bb8f..ad35e93 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,10 +6,18 @@ on:
jobs:
+ cgitize:
+ secrets: inherit
+ uses: ./.github/workflows/cgitize.yml
+
infra:
secrets: inherit
uses: ./.github/workflows/infra.yml
+ jekyll:
+ secrets: inherit
+ uses: ./.github/workflows/jekyll.yml
+
yandex-cloud-cli-bin:
secrets: inherit
uses: ./.github/workflows/yandex-cloud-cli-bin.yml