47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Building binaries
|
|
|
|
on:
|
|
# Runs on pushes targeting the default branch
|
|
push:
|
|
branches:
|
|
- main
|
|
# Runs every day at 1 a.m.
|
|
schedule:
|
|
- cron: '0 1 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-22.04"]
|
|
version: ["3.3.6", "3.2.6", "3.1.6"]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: checkout pages
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: "binaries"
|
|
path: "binaries"
|
|
- name: setup and package Ruby
|
|
run: |
|
|
apt-get update && \
|
|
apt-get install curl wget tar build-essential zlib1g-dev gpg -y && \
|
|
curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
|
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - && \
|
|
curl -sSL https://get.rvm.io | bash -s stable && \
|
|
source /etc/profile.d/rvm.sh && \
|
|
rvm get head && \
|
|
rvm install ${{ matrix.version }} && \
|
|
ruby -v && \
|
|
rvm prepare ${{ matrix.version }} --path
|
|
- name: push binaries
|
|
run: |
|
|
cd binaries && \
|
|
git config user.name "${{ gitea.actor }}" && \
|
|
git config user.email ""${{ gitea.actor }}"@noreply.git.morlana.online" && \
|
|
git add -A && \
|
|
git commit -m "ruby ${{ matrix.version }} build for ${{ matrix.os }} from Action ${GITHUB_SHA}" && \
|
|
git push
|