Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
feat(github): update to new Github Actions syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
m0nhawk committed Aug 19, 2019
1 parent ded7567 commit a8f22ed
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
FROM continuumio/miniconda3:4.5.12

LABEL "com.github.actions.name"="Publish Anaconda Package"
LABEL "com.github.actions.description"="Package and publish Anaconda modules."
LABEL "com.github.actions.icon"="package"
LABEL "com.github.actions.color"="purple"
FROM continuumio/miniconda3:4.6.14

LABEL "repository"="https://github.com/m0nhawk/conda-package-publish-action"
LABEL "maintainer"="Andrew Prokhorenkov <[email protected]>"

RUN conda install anaconda-client conda-build

ADD entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Conda Package Publish Action'
description: 'Build and Publish conda package'
author: 'Andrew Prokhorenkov'
branding:
icon: 'package'
color: 'purple'
inputs:
subDir:
description: 'Sub-directory with project'
default: ''
AnacondaUsername:
description: 'Anaconda Username'
AnacondaPassword:
description: 'Anaconda Password'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.subDir }}
- ${{ inputs.AnacondaUsername }}
- ${{ inputs.AnacondaPassword }}
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -ex
set -o pipefail

go_to_build_dir() {
if [ ! -z $SUBDIR ]; then
cd $SUBDIR
if [ ! -z $INPUT_SUBDIR ]; then
cd $INPUT_SUBDIR
fi
}

Expand All @@ -25,7 +25,7 @@ check_if_meta_yaml_file_exists() {

upload_package(){
conda config --set anaconda_upload yes
anaconda login --username $ANACONDA_USERNAME --password $ANACONDA_PASSWORD
anaconda login --username $INPUT_ANACONDAUSERNAME --password $INPUT_ANACONDAPASSWORD
conda build .
anaconda logout
}
Expand Down

0 comments on commit a8f22ed

Please sign in to comment.