Nightly Build #1372
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
--- | |
name: Nightly Build | |
on: # yamllint disable-line rule:truthy | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
DEBFULLNAME: "github-actions[bot]" | |
DEBEMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | |
DEBIAN_FRONTEND: noninteractive | |
DPKG_COLORS: always | |
TZ: UTC | |
jobs: | |
calendar: | |
name: Date and Time | |
runs-on: ubuntu-20.04 | |
outputs: | |
date: ${{ steps.datetime.outputs.date }} | |
steps: | |
- name: Get Current Date | |
id: datetime | |
run: echo "date=$(date +%s)" >> $GITHUB_OUTPUT | |
build: | |
name: Build TrafficServer | |
needs: calendar | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: true | |
matrix: | |
profile: [debug, release, relwithdebinfo] | |
steps: | |
- name: Update Apt Package Index | |
run: | | |
echo msodbcsql17 msodbcsql/ACCEPT_EULA boolean true | sudo debconf-set-selections | |
sudo apt-mark hold grub-efi-amd64-signed | |
sudo apt-get update --quiet | |
sudo apt-get --yes --quiet upgrade | |
- name: Setup Build Environment | |
run: >- | |
sudo apt-get install --yes | |
git-buildpackage | |
build-essential | |
devscripts | |
debhelper | |
equivs | |
libbrotli-dev | |
- name: Setup Maintenance Script Path | |
run: echo "${{github.workspace}}/readme-and-settings/debian/scripts" >> $GITHUB_PATH | |
- name: Setup GitHub Actions Bot | |
run: |- | |
git config --global user.name "$DEBFULLNAME" | |
git config --global user.email "$DEBEMAIL" | |
- name: Checkout Netlify TrafficServer 9.1.x | |
uses: actions/checkout@v2 | |
with: | |
ref: 9.1.x-netlify | |
path: 9.1.x-netlify | |
- name: Checkout Netlify TrafficServer 9.2.x | |
uses: actions/checkout@v2 | |
with: | |
ref: 9.2.x-netlify | |
path: 9.2.x-netlify | |
- name: Checkout Debian Package Files | |
uses: actions/checkout@v2 | |
with: | |
ref: readme-and-settings | |
path: readme-and-settings | |
- name: Copy Debian Packaging Files | |
run: |- | |
cp -r readme-and-settings/debian 9.1.x-netlify/ | |
cp -r readme-and-settings/debian 9.2.x-netlify/ | |
- name: Update 9.1.x Changelog | |
working-directory: 9.1.x-netlify | |
run: >- | |
update-debian-changelog | |
--distribution=nightly | |
--version=${{needs.calendar.outputs.date}} | |
--revision=0 | |
--profile=${{matrix.profile}} | |
--package=netlify-trafficserver-dev | |
--package=netlify-trafficserver | |
- name: Update 9.2.x Changelog | |
working-directory: 9.2.x-netlify | |
run: >- | |
update-debian-changelog | |
--distribution=nightly | |
--version=${{needs.calendar.outputs.date}} | |
--revision=0 | |
--profile=${{matrix.profile}} | |
--package=netlify-trafficserver-dev | |
--package=netlify-trafficserver | |
- name: Build 9.1.x Packages | |
working-directory: 9.1.x-netlify | |
run: >- | |
gbp buildpackage | |
--git-verbose | |
--git-debian-branch=readme-and-settings | |
--git-upstream-tag=9.1.x-netlify | |
--build-profiles=${{matrix.profile}} | |
--buildinfo-option=-u${GITHUB_WORKSPACE} | |
--changes-option=-u${GITHUB_WORKSPACE} | |
- name: Build 9.2.x Packages | |
working-directory: 9.2.x-netlify | |
run: >- | |
gbp buildpackage | |
--git-verbose | |
--git-debian-branch=readme-and-settings | |
--git-upstream-tag=9.2.x-netlify | |
--build-profiles=${{matrix.profile}} | |
--buildinfo-option=-u${GITHUB_WORKSPACE} | |
--changes-option=-u${GITHUB_WORKSPACE} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{matrix.profile}} | |
path: |- | |
${{github.workspace}}/*.deb | |
${{github.workspace}}/*.ddeb | |
upload: | |
name: Create Release | |
needs: [build, calendar] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
- name: Create Release | |
uses: actions/create-release@v1 | |
id: release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
release_name: ${{ needs.calendar.outputs.date}} | |
tag_name: ${{ needs.calendar.outputs.date}} | |
- name: Upload Packages | |
run: >- | |
shopt -s globstar; | |
set -e; | |
upload_url=$(echo "${{steps.release.outputs.upload_url}}" | sed -e 's/{.*}//g')?name; | |
for filename in $(ls **/*.{deb,ddeb}); | |
do curl | |
-X POST | |
-H "Authorization: token ${{github.token}}" | |
-H "Accept: application/vnd.github.v3+json" | |
-H "Content-Length: $(stat --printf='%s' ${filename})" | |
-H "Content-Type: application/vnd.debian.binary-package" | |
--data-binary @${filename} | |
${upload_url}=$(basename ${filename}); | |
done |