Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed May 20, 2024
0 parents commit 272fe2b
Show file tree
Hide file tree
Showing 12 changed files with 1,655 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build sb binary
on:
workflow_dispatch:
push:
paths:
- 'sb.py'
- 'requirements.txt'
tags:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: self-hosted
steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Setup venv
run: python3.10 -m venv venv

- name: Install Dependencies
run: ./venv/bin/pip install -r requirements.txt

- name: List Pip modules
run: ./venv/bin/pip list

- name: Compile binary
run: |
echo "Building with version ${GITHUB_REF#refs/tags/}"
export APP_VERSION=${GITHUB_REF#refs/tags/}
./venv/bin/python -m nuitka sb.py --onefile -o sb && chmod +x sb
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
sb
- name: Run release workflow
if: startsWith(github.ref, 'refs/tags/')
run: gh workflow run release.yml -f release_tag=${{ github.ref }}
env:
GH_TOKEN: ${{ github.token }}

- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update Release File

on:
workflow_dispatch:
inputs:
release_tag:
required: true

jobs:
update-release-file:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Write tag to release.txt
run: echo "${{ inputs.release_tag }}" > release.txt

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: Continuous Integration
author_email: username@users.noreply.github.com
message: 'Update release.txt with the latest tag'
add: 'release.txt'
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Logs
/*.log
/.idea
/cache.json
/sb
16 changes: 16 additions & 0 deletions requirements-saltbox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ansible==9.5.1
ansible-lint==24.5.0
argon2_cffi==23.1.0
dnspython==2.6.1
docker==7.0.0
jinja2==3.1.4
jmespath==1.0.1
lxml==5.2.2
ndg-httpsclient==0.5.1
netaddr==1.2.1
passlib==1.7.4
PyMySQL==1.1.0
pyOpenSSL==24.1.0
requests==2.31.0
ruamel.yaml==0.18.6
tld==0.13
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PyYAML~=6.0.1
nuitka~=2.2.3
requests==2.31.0
python-magic=0.4.27

0 comments on commit 272fe2b

Please sign in to comment.