Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workflows for linting and building/releasing iso #11

Merged
merged 1 commit into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Build ArchLinux zfs iso
on:
schedule: # arch relases are published first day of the month
- cron: '50 23 1 * *' # https://gitlab.archlinux.org/archlinux/releng/-/pipeline_schedules
workflow_dispatch:
pull_request:
types:
- closed

jobs:
iso:
if: ${{ github.event.pull_request.merged == true ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
container:
image: archlinux:latest
options: --privileged
steps:
- name: Set timestamp tag
id: timetag
run: echo "timestamp=$(date +'%Y%m%d')" >> "$GITHUB_ENV"
- name: Check out codebase
uses: actions/checkout@v3
- name: Install requirements
run: |
pacman -Sy
pacman -S --noconfirm archlinux-keyring archiso
pacman-key --init
pacman-key -r DDF7DB817396A49B2A2723F7403BD972F75D9D76
pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76
- name: Build iso
run: |
chmod +x ./*.sh
ls
bash ./build.sh -r week --verbose
- name: Upload a release
uses: softprops/action-gh-release@v1
with:
name: archlinux-archzfs-linux-${{ env.timestamp }}
tag_name: ${{ env.timestamp }}
prerelease: ${{ github.event_name != 'schedule' }}
files: |
dynamic_data/out/*
55 changes: 55 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base

#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}