From c04a764fa62cd29a99e383f3842171b498e64591 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 6 Feb 2020 15:03:15 -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 0000000..a2d3ac5 --- /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 0000000..6a892da --- /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 d9bb748e807ea3f6dd024941c76ffb7e2f4a3f65 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 0000000..ac05ef8 --- /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 6a892da..61bf953 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 c72425a8da5df83eb9c92c4406cd28b5f02a4443 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 61bf953..0c05178 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 8d1d57579a0628b856be60ecb203865faededcc3 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Mon, 10 Feb 2020 13:53:17 -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 a2d3ac5..1bd7b3a 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: