mirror of
https://github.com/t2linux/fedora.git
synced 2026-04-30 13:51:42 -07:00
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
name: Build
|
|
on:
|
|
push:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v3
|
|
|
|
- name: "Lint"
|
|
run: |
|
|
docker run \
|
|
--quiet \
|
|
-v "$PWD":/repo \
|
|
ghcr.io/t2linux/fedora-dev:latest \
|
|
/repo/lint.sh
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Increase Disk Space"
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /usr/local/lib/android
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
|
sudo docker image prune --all --force
|
|
sudo rm -rf /home/linuxbrew
|
|
sudo apt-get remove -y --purge fonts-noto-color-emoji subversion \
|
|
sshpass g++ gcc gnupg2 imagemagick jq libmagic-dev \
|
|
libmagickcore-dev libmagickwand-dev libssl-dev \
|
|
mercurial openssh-client p7zip-full ftp bison
|
|
sudo apt-get autoremove -y
|
|
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: "Build"
|
|
run: |
|
|
docker run \
|
|
--privileged \
|
|
-v "$PWD":/repo \
|
|
ghcr.io/t2linux/fedora-dev:latest \
|
|
/repo/build-packages.sh
|
|
|
|
- name: "Upload Artifact"
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: packages
|
|
path: builddir/packages/*.rpm
|
|
|
|
- name: "Release"
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
builddir/packages/*.rpm
|
|
|
|
deploy:
|
|
needs: ["build"]
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: ./.github/workflows/deploy.yaml
|
|
secrets: inherit
|