Skip to content

Commit

Permalink
Success; (-) debugging prompts action input args
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 4, 2020
1 parent a1988c1 commit 288aaab
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- name: Checkout this Repo
uses: actions/checkout@v2

# print contents of GITHUB_WORKSPACE dir
- name: verify contents
run: ls $GITHUB_WORKSPACE
# # print contents of GITHUB_WORKSPACE dir
# - name: verify contents
# run: ls $GITHUB_WORKSPACE

# Runs a this repo's action
- name: Run Build action
Expand Down
54 changes: 26 additions & 28 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ rmskin-action

A Python-based Github action tool to package a Repository's Rainmeter Content into a validating .rmskin file for Rainmeter's Skin Installer

Input Arguments
===============
.. Input Arguments
.. ===============
* ``version`` : (Optional) Version of the Rainmeter rmskin package.
* ``title`` : (Optional) Name of the Rainmeter rmskin package.
* ``author`` : (Optional) Account Username maintaining the rmskin package.
* ``path`` : (Optional) Base directory of repo being packaged.
.. * ``version`` : (Optional) Version of the Rainmeter rmskin package.
.. * ``title`` : (Optional) Name of the Rainmeter rmskin package.
.. * ``author`` : (Optional) Account Username maintaining the rmskin package.
.. * ``path`` : (Optional) Base directory of repo being packaged.
Output Arguments
================
Expand All @@ -21,25 +21,23 @@ Example Usage

.. code-block:: yaml
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: checkout a test repo of a rainmeter skin
# Checks-out a repository under $GITHUB_WORKSPACE, so your job can access it
uses: actions/checkout@v2
with:
repositoy: 2bndy5/Goo-e-Rainmeter-Skin
# Runs a this repo's action
- name: Run Build action
id: builder
uses: 2bndy5/rmskin-action
# Use the output from the `builder` step
- name: Print the output path & filename
run: echo "The output file was ${{ steps.builder.outputs.arc_name }}"
jobs:
Build:
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout this Repo
uses: actions/checkout@v2
# # print contents of GITHUB_WORKSPACE dir
# - name: verify contents
# run: ls $GITHUB_WORKSPACE
# Runs a this repo's action
- name: Run Build action
id: builder
uses: 2bndy5/rmskin-action@master
# Use the output from the `builder` step
- name: Print the output path & filename
run: echo "The output file was ${{ steps.builder.outputs.arc_name }}"
26 changes: 13 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ branding:
icon: 'droplet'
color: 'green'

inputs:
version: # 'auto'
description: 'Version of the Rainmeter rmskin package.'
required: false
title: # 'Unknown'
description: 'Name of the Rainmeter rmskin package.'
required: false
author: # 'Unknown'
description: 'Account Username maintaining the rmskin package.'
required: false
path: # '.'
description: 'Base directory of repo being packaged.'
required: false
# inputs:
# version: # 'auto'
# description: 'Version of the Rainmeter rmskin package.'
# required: false
# title: # 'Unknown'
# description: 'Name of the Rainmeter rmskin package.'
# required: false
# author: # 'Unknown'
# description: 'Account Username maintaining the rmskin package.'
# required: false
# path: # '.'
# description: 'Base directory of repo being packaged.'
# required: false
outputs:
arc_name: # path to & name of archive file that was generated
description: 'path Filename of rmskin file'
Expand Down
10 changes: 4 additions & 6 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"RMSKIN.ini": False,
"Skins": 0,
"Layouts": 0,
"Plugins": 0,
"Plugins": False,
"@Vault": 0,
}

Expand All @@ -85,26 +85,24 @@ def main():
HAS_COMPONENTS["Skins"] = len(dirnames)
print("Found {} possible Skin(s)".format(HAS_COMPONENTS["Skins"]))
elif dirpath.endswith("@Vault"):
HAS_COMPONENTS["@Vault"] = len(dirnames) + len(filenames)
HAS_COMPONENTS["@Vault"] = len(filenames) + len(dirnames)
print("Found {} possible @Vault item(s)".format(HAS_COMPONENTS["@Vault"]))
elif dirpath.endswith("Plugins"):
if len(dirnames) > 0:
HAS_COMPONENTS["Plugins"] = len(filenames) / len(dirnames)
print("Found {} possible Plugin(s)".format(HAS_COMPONENTS["Plugins"]))
HAS_COMPONENTS["Plugins"] = True
print("Found Plugins folder")
elif dirpath.endswith("Layouts"):
HAS_COMPONENTS["Layouts"] = len(filenames) + len(dirnames)
print("Found {} possible Layout(s)".format(HAS_COMPONENTS["Layouts"]))
elif len(dirpath) == 0 and "RMSKIN.ini" in filenames:
HAS_COMPONENTS["RMSKIN.ini"] = True
print("Found RMSKIN.ini file")
for d in dirnames: # exclude hidden directories
print(f"looking at {d}")
if d.startswith("."):
del d
# set depth of search to shallow (2 folders deep)
if len(dirpath) > 0:
dirnames.clear()
print("using working dir: {}".format(os.getcwd()))
# quite if bad dir struct
if not (
HAS_COMPONENTS["Layouts"]
Expand Down

0 comments on commit 288aaab

Please sign in to comment.