You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB
YAML

name: Build OpenWRT Images
on: [push]
jobs:
build:
name: Prepare and build OpenWRT images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build target images
run: |
bash build_gli_beryl.sh
- name: TAR output
run: tar -cvf images.tar images
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: images
path: images.tar
release:
name: Make a release
runs-on: ubuntu-latest
needs: build
steps:
- name: Set env for SHA
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- name: Download the image artifacts
uses: actions/download-artifact@v2
with:
name: images
- name: Extract the image artifacts
run: tar xf images.tar
- name: Get the current date
run: echo "NOW=$(date +%F)" >> $GITHUB_ENV
- name: Create a release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
title: "OpenWRT PrivateRouter SHA ${{ env.GITHUB_SHA_SHORT }}"
automatic_release_tag: "OpenWRT-PrivateRouter-${{ env.GITHUB_SHA_SHORT }}"
files: images/*