Skip to content

ci: add workflow_dispatch #92

ci: add workflow_dispatch

ci: add workflow_dispatch #92

Workflow file for this run

name:
CI
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: '0 0 * * MON'
jobs:
test:
name: 'Cross Platform Testing'
runs-on: ubuntu-latest
strategy:
matrix:
docker_image: ["debian-buster", "debian-bullseye", "debian-bookworm", "ubuntu-18.04", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]
platform: ["linux-arm64", "linux-amd64"]
steps:
- name: 'Set up QEMU for cross-platform emulation'
uses: docker/setup-qemu-action@v2
- name: 'Check out repository'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Test README.md Instructions'
env:
PROJECT_NAME: ${{ github.event.repository.name }}
DOCKER_IMAGE: ${{ matrix.docker_image }}
PLATFORM: ${{ matrix.platform }}
run: |
.github/docker/launcher.sh
shell: bash
- name: 'Upload artifacts'
uses: actions/upload-artifact@v3
with:
name: 'executed-test-scripts'
path: |
~/${{ matrix.platform }}_${{ matrix.docker_image }}/${{ matrix.platform }}_${{ matrix.docker_image }}.sh
release:
name: 'Create Release'
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Changelog Pruning'
run: |
sed -n `awk '/## \[${{ github.ref_name }}/{c++} c==1{ print NR; exit }' CHANGELOG.md`',$p' CHANGELOG.md > .CHANGELOG.md.tmp
sed `awk '/## \[[x0-9]/{c++} c==2{ print NR; exit }' .CHANGELOG.md.tmp`',$d' .CHANGELOG.md.tmp > ${{ github.workspace }}-CHANGELOG.txt
- name: 'Download artifacts'
uses: actions/download-artifact@v3
with:
name: 'executed-test-scripts'
path: ci-script-collection
- name: 'Create release'
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
draft: false
prerelease: false
files: |
LICENSE
ci-script-collection/*