Skip to content

Concurrency rule on build-images too. #56

Concurrency rule on build-images too.

Concurrency rule on build-images too. #56

Workflow file for this run

name: build-images

Check failure on line 1 in .github/workflows/build-images.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-images.yaml

Invalid workflow file

`concurrency` is not a valid event name
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
# all branches for now while we're testing.
#branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on:
labels: ubuntu-22.04-8core
steps:
- uses: actions/checkout@v4
- name: install needed packages
run: |
sudo apt update
sudo apt install binfmt-support
sudo apt install qemu qemu-user-static
sudo update-binfmts --enable
- name: Detect if release
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "IS_RELEASE=1" >> $GITHUB_ENV
else
echo "IS_RELEASE=0" >> $GITHUB_ENV
fi
- name: Build the full images
run: |
./dobuild.sh
# Print output directory files
- name: List output files
run: ls -lh deploy
- name: Upload built image
if: env.IS_RELEASE == '1'
uses: actions/upload-artifact@v3
with:
name: rpios-image
path: ./deploy/GroundlightPi-*.img.xz
if-no-files-found: error
- name: Upload debug artifacts
if: env.IS_RELEASE == '1'
uses: actions/upload-artifact@v3
with:
name: debug-files
path: |
./deploy/*.info
./deploy/build.log
if-no-files-found: error
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on:
labels: ubuntu-22.04-8core
steps:
- uses: actions/download-artifact@v3
with:
name: rpios-image
- uses: softprops/action-gh-release@v1
with:
files: '**/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}