From 37fae880c7fb3d2ab80ad26c59f045ef75bcedbf Mon Sep 17 00:00:00 2001 From: brendan <2bndy5@gmail.com> Date: Sun, 5 Jul 2020 02:29:55 -0700 Subject: [PATCH] use version tags instead sha caboose; some cleanup --- Dockerfile | 1 - action.yml | 2 +- release.py | 10 +++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index bb331b3..9a98934 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ COPY enter_rmskin_builder.sh /enter_rmskin_builder.sh COPY release.py /rmskin_builder.py COPY requirements.txt /reqs.txt RUN chmod +x /enter_rmskin_builder.sh -# RUN ls # Code file to execute when the docker container starts up (`enter_rmskin_builder.sh`) ENTRYPOINT ["/enter_rmskin_builder.sh"] \ No newline at end of file diff --git a/action.yml b/action.yml index 60f3b50..63f7477 100644 --- a/action.yml +++ b/action.yml @@ -21,7 +21,7 @@ branding: # required: false outputs: arc_name: # path to & name of archive file that was generated - description: 'path Filename of rmskin file' + description: 'name of rmskin file' runs: using: 'docker' image: 'Dockerfile' diff --git a/release.py b/release.py index 9563f5c..80591dd 100644 --- a/release.py +++ b/release.py @@ -40,8 +40,8 @@ metavar='"STR"', type=str, default=os.getenv("GITHUB_SHA", "x0x.x0x/")[-8:] - if os.getenv("GITHUB_REF", "").startswith("refs/") - else os.getenv("GITHUB_REF", "0.0"), + if not os.getenv("GITHUB_REF", "").startswith("refs/tags/") + else os.getenv("GITHUB_REF", "refs/tags/0.0").replace("refs/tags/", ""), help="Version of release. This should be the github action env var (GITHUB_REF or last 8 digits of GITHUB_SHA).", ) parser.add_argument( @@ -224,11 +224,7 @@ def main(): arc_file.write(custom_footer) print("Archive successfully prepared.") - print( - "::set-output name=arc_name::{}".format( - arc_name + "_" + version + ".rmskin" - ) - ) + print("::set-output name=arc_name::{}".format(arc_name + "_" + version + ".rmskin")) if __name__ == "__main__":