Skip to content

Commit

Permalink
Add GitHub workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
HackingM committed Feb 13, 2020
1 parent ec5746f commit 2872b7d
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/action-ebuild-maintain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Ebuild Maintain

on:
repository_dispatch:
schedule:
# min hour day month dow
- cron: "0 1 * * 1"

jobs:
action-ebuild-maintain:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@master

# Prepare the environment
- name: Prepare
id: prepare
run: |
echo "::set-output name=datetime::$(date +"%Y%m%d%H%M")"
echo "::set-output name=workspace::${GITHUB_WORKSPACE}"
mkdir -p "${GITHUB_WORKSPACE}/distfiles" "${GITHUB_WORKSPACE}/binpkgs"
# Cache distfiles and binary packages
- name: Cache distfiles
id: cache-distfiles
uses: gerbal/[email protected]
with:
path: ${{ steps.prepare.outputs.workspace }}/distfiles
key: distfiles-${{ steps.prepare.outputs.datetime }}
restore-keys: |
distfiles-${{ steps.prepare.outputs.datetime }}
distfiles
# Run the ebuild keyword action
- uses: hacking-gentoo/action-ebuild-maintain@next
with:
auth_token: ${{ secrets.PR_TOKEN }}
deploy_key: ${{ secrets.DEPLOY_KEY }}
overlay_repo: MADhacking/overlay
overlay_branch: master
16 changes: 16 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Package

on:
release:
types: [published, edited]

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: hacking-gentoo/action-ebuild-release@next
with:
auth_token: ${{ secrets.PR_TOKEN }}
deploy_key: ${{ secrets.DEPLOY_KEY }}
overlay_repo: MADhacking/overlay
56 changes: 56 additions & 0 deletions .github/workflows/run-ebuild-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Ebuild Tests

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'

jobs:
tests:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@master

# Prepare the environment
- name: Prepare
id: prepare
run: |
echo "::set-output name=datetime::$(date +"%Y%m%d%H%M")"
echo "::set-output name=workspace::${GITHUB_WORKSPACE}"
mkdir -p "${GITHUB_WORKSPACE}/distfiles" "${GITHUB_WORKSPACE}/binpkgs"
# Cache distfiles and binary packages
- name: Cache distfiles
id: cache-distfiles
uses: gerbal/[email protected]
with:
path: ${{ steps.prepare.outputs.workspace }}/distfiles
key: distfiles-${{ steps.prepare.outputs.datetime }}
restore-keys: |
distfiles-${{ steps.prepare.outputs.datetime }}
distfiles
- name: Cache binpkgs
id: cache-binpkgs
uses: gerbal/[email protected]
with:
path: ${{ steps.prepare.outputs.workspace }}/binpkgs
key: binpkgs-${{ steps.prepare.outputs.datetime }}
restore-keys: |
binpkgs-${{ steps.prepare.outputs.datetime }}
binpkgs
# Run the ebuild tests
- uses: hacking-gentoo/action-ebuild-test@next
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
auth_token: ${{ secrets.PR_TOKEN }}
deploy_key: ${{ secrets.DEPLOY_KEY }}
overlay_repo: MADhacking/overlay
19 changes: 19 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Shellcheck

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: hacking-actions/shellcheck@master

0 comments on commit 2872b7d

Please sign in to comment.