Skip to content

ci: run build workflow on external pull requests #150

ci: run build workflow on external pull requests

ci: run build workflow on external pull requests #150

Workflow file for this run

# SPDX-FileCopyrightText: Copyright 2024 Siemens AG
#
# SPDX-License-Identifier: MPL-2.0
name: build browser extension
on:
push:
pull_request:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to checkout the repository
permissions:
contents: read
env:
WEB_EXT_VERS: 8.2.0
jobs:
reuse-and-codestyle:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
sudo apt-get update && sudo apt-get install -y python3-gi flake8 pylint python3-pydbus black
pip3 install --break-system-packages fsfe-reuse
git clean -f -d
- name: execute linters
run: |
reuse lint
flake8 --max-line-length=88
pylint linux-entra-sso.py
- name: check Python code formatting
run: black --diff --check .
- name: run prettier
uses: creyD/[email protected]
with:
dry: true
prettier_options: '--check **/*.{js,html,css}'
build-xpi:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dependencies
run: |
sudo apt update && sudo apt install -y make git zip
- run: make package deb
- name: "web-ext lint"
run: |
npx web-ext@${{ env.WEB_EXT_VERS }} lint --source-dir build/firefox --self-hosted
- name: upload firefox extension
uses: actions/upload-artifact@v4
with:
name: firefox-xpi
path: |
build/**/*.xpi
- name: upload chrome extension zip
uses: actions/upload-artifact@v4
with:
name: chrome-zip
path: |
build/chrome/
- name: upload debian package
uses: actions/upload-artifact@v4
with:
name: debian-package
path: |
pkgs/linux-entra-sso_*.deb
- name: attest extension artifacts
uses: actions/attest-build-provenance@v1
with:
subject-path: |
build/Linux-Entra-SSO-v*
pkgs/linux-entra-sso_*.deb