From e3d44e19d8606707fd22ab6a50329aca9e740817 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 6 Feb 2020 15:03:16 -0500 Subject: [PATCH 1/4] added workflows --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 26 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..a2d3ac5c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Conda build +on: + push: + branches: + - master + release: + types: + - created + +jobs: + build-linux: + runs-on: ubuntu-latest + name: Build on Linux + steps: + - name: Login to GitHub Package Registry + run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} + - name: Pull Docker image + run: docker pull docker.pkg.github.com/sot/skare3/centos5-builder:latest + - name: Build + id: build + run: > + docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace + -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD + docker.pkg.github.com/sot/skare3/centos5-builder:latest + ${GITHUB_REPOSITORY} --tag ${GITHUB_SHA} + env: + CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }} + GIT_USERNAME: chandra-xray + GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }} + GIT_ASKPASS: /home/aca/git_pass.py + - uses: sot/skare3_tools/actions/gdrive_upload@master + name: Upload to Google Drive + with: + files: | + builds/linux-64 + builds/noarch + directory: /ska3/conda-test + options: --drive=cxc_ops + env: + GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }} + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..6a892da3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release +on: + release: + types: + - created + +jobs: + patch-release: + runs-on: ubuntu-latest + name: Patch Release + steps: + - name: Fetch Skare3 Tools + uses: actions/checkout@v2 + with: + repository: sot/skare3_tools + ref: scripts + path: skare3_tools + - name: Patch + run: | + sudo pip3 install setuptools + sudo pip3 install -r ./skare3_tools/requirements.txt + sudo pip3 install ./skare3_tools + skare3-release-merge-info --user $GITHUB_ACTOR --repository $GITHUB_REPOSITORY --sha $GITHUB_SHA + skare3-create-issue --user $GITHUB_ACTOR --repository sot/skare3 --title Title --body body + env: + GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} From 76a408190fd4862858bbadf976d002a5c1940e5b Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 6 Feb 2020 15:46:48 -0500 Subject: [PATCH 2/4] Use skare3 master in release workflow. Add pull request template --- .github/pull_request_template.md | 10 ++++++++++ .github/workflows/release.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..ac05ef83 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +## Description + + + +## Testing + +- [ ] Passes unit tests on MacOS, linux, Windows (at least one required) +- [ ] Functional testing + +Fixes # \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a892da3..61bf9539 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: sot/skare3_tools - ref: scripts + ref: master path: skare3_tools - name: Patch run: | From 9713e68b1b3126a836fe580ec19b1778ae11ce5f Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 7 Feb 2020 12:00:48 -0500 Subject: [PATCH 3/4] fixed release workflow so skare3 issue has title and body according to release --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61bf9539..0c051787 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,12 +15,12 @@ jobs: repository: sot/skare3_tools ref: master path: skare3_tools - - name: Patch + - name: Release Description and Skare3 Issue run: | sudo pip3 install setuptools sudo pip3 install -r ./skare3_tools/requirements.txt sudo pip3 install ./skare3_tools skare3-release-merge-info --user $GITHUB_ACTOR --repository $GITHUB_REPOSITORY --sha $GITHUB_SHA - skare3-create-issue --user $GITHUB_ACTOR --repository sot/skare3 --title Title --body body + skare3-create-issue --user $GITHUB_ACTOR --repository sot/skare3 --latest-release $GITHUB_REPOSITORY --label 'Package update' env: GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} From bd3076b1be8081c0bedcff59d2a3a3567fe2e5c8 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Mon, 10 Feb 2020 13:53:18 -0500 Subject: [PATCH 4/4] enable triggering conda build using repository dispatch --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2d3ac5c..1bd7b3a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,9 @@ on: release: types: - created + repository_dispatch: + types: + - conda-build jobs: build-linux: