github: Add workflow to build bundles
Bundles contain an extract script that can be run when unbundled that puts everything in its place just like an install would do but without the need for python or the json files. Signed-off-by: Nicholas Mello <nick@nmello.dev>
This commit is contained in:
38
.github/workflows/bundle.yml
vendored
Normal file
38
.github/workflows/bundle.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Build Dotfile Bundles
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
bundle:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Step 1: Checkout your repository
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Step 2: Set up Python
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
|
||||
# Step 3: Run manager bundle for each tool
|
||||
- name: Build bundles
|
||||
run: |
|
||||
./manager bundle nvim
|
||||
./manager bundle git
|
||||
./manager bundle fish
|
||||
./manager bundle tmux
|
||||
./manager bundle
|
||||
|
||||
# Step 4: Upload bundles as artifacts
|
||||
- name: Upload bundles
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dotfile-bundles
|
||||
path: "*.tar.gz"
|
||||
4
manager
4
manager
@@ -229,4 +229,6 @@ if __name__ == "__main__":
|
||||
elif args.action == "clean":
|
||||
clean(entries)
|
||||
elif args.action == "bundle":
|
||||
create_tool_bundle(datetime.now().strftime("%Y-%m-%d-%H-%M"), entries)
|
||||
tools = "-".join(sorted(list({entry['tool'] for entry in entries})))
|
||||
bundle_name = f"{datetime.now().strftime('%Y-%m-%d-%H-%M')}-{tools}"
|
||||
create_tool_bundle(bundle_name, entries)
|
||||
|
||||
Reference in New Issue
Block a user