This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
Build #422
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Build | |
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 12 * * *' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
#container: ubuntu:21.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Update apt | |
run: sudo apt-get -y update | |
- name: Upgrade apt | |
run: sudo apt-get -y upgrade | |
# Runs a set of commands using the runners shell | |
- name: Install dependencies | |
run: sudo apt install -y debhelper/focal-backports libdebhelper-perl/focal-backports | |
libgd-dev libgeoip-dev libhiredis-dev | |
libluajit-5.1-dev libmaxminddb-dev | |
libmhash-dev libpam0g-dev | |
libpcre3-dev libpcre2-dev | |
libperl-dev libpcre++-dev | |
libssl-dev libxslt1-dev | |
po-debconf quilt | |
zlib1g-dev dpkg-dev libexpat-dev | |
wget git gpg | |
- name: Download all resources | |
run: | | |
git clone https://salsa.debian.org/nginx-team/nginx.git | |
cd nginx | |
#NGINX_TAG=$(git describe --tags `git rev-list --tags` | grep debian | head -n 1) | |
#git checkout $NGINX_TAG | |
cd debian/modules | |
git clone https://github.com/apache/incubator-pagespeed-ngx.git | |
cd incubator-pagespeed-ngx | |
git checkout tags/latest-stable | |
echo `echo wget -O psol.tar.gz; cat PSOL_BINARY_URL` | BIT_SIZE_NAME=x64 bash | |
tar -xzvf psol.tar.gz | |
# Temporary fix for #2 | |
- name: Update http-subs-filter (temporary fix) | |
run: | | |
git init | |
git clean -d -f | |
git remote add origin https://github.com/yaoweibin/ngx_http_substitutions_filter_module | |
git pull origin master | |
working-directory: nginx/debian/modules/http-subs-filter | |
- name: Remove patches for updates http-subs-filter | |
run: rm -r nginx/debian/modules/patches/http-subs-filter/ | |
- name: Patch rules | |
run: | | |
sed -i 's/\-\-with\-threads/\-\-with-threads \-\-add\-module=\$(MODULESDIR)\/incubator\-pagespeed\-ngx/' rules | |
sed -i 's/\-\-with\-debug//' rules | |
working-directory: nginx/debian | |
- name: Build Package | |
run: sudo dpkg-buildpackage -rfakeroot -uc -b | |
working-directory: nginx | |
- name: Checkout current repository | |
uses: actions/[email protected] | |
with: | |
path: 'repo' | |
# # To dispatch with a push | |
# token: ${{ secrets.PAT }} | |
- name: Move packages to repository | |
run: mkdir -p repo/dist && mv *.deb repo/dist | |
- name: Build Repository | |
run: | | |
echo ${{ secrets.GPG_PUBLIC }} | base64 -d | gpg --import | |
echo ${{ secrets.GPG_PRIVATE }} | base64 -d | gpg --import | |
dpkg-scanpackages . > Packages | |
apt-ftparchive release . > Release | |
gpg -a --yes --clearsign --output InRelease --detach-sign Release | |
working-directory: repo/dist | |
- name: Upload packages | |
uses: EndBug/add-and-commit@v7 # You can change this to use a specific version. | |
with: | |
# The arguments for the `git add` command (see the paragraph below for more info) | |
# Default: '.' | |
add: 'dist' | |
# Default: '.' | |
cwd: './repo' | |
# The message for the commit. | |
# Default: 'Commit from GitHub Actions (name of the workflow)' | |
message: 'Daily Build' | |
# Arguments for the git pull command. Use NO-PULL to avoid the action pulling at all. | |
# Default: '--no-rebase' | |
pull: 'NO-PULL' | |
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info) | |
# Default: true | |
push: true |