-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.91 KB
/
conda-docker-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Conda and Docker Update
on:
release:
types: [published]
jobs:
build-and-upload-conda:
runs-on: ubuntu-latest
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set Package Version
shell: bash
run: |
echo "__version__ = '${{ github.event.release.tag_name }}'" > version.py
- name: Update Version in Conda Recipe
shell: bash
run: |
sed -i "s/\$VERSION/${{ github.event.release.tag_name }}/g" conda-recipe/meta.yaml
- name: Validate versions
run: cat conda-recipe/meta.yaml; cat version.py
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
activate-environment: build-env
python-version: "3.10"
miniconda-version: latest
- name: Build Conda Package
shell: bash -l {0}
run: |
conda install conda-build anaconda-client conda-verify
conda build -c ecoevoinfo -c conda-forge -c biocondaconda-recipe --output-folder ./build
- name: Upload Conda Package to Anaconda Cloud
shell: bash -l {0}
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda upload --user ecoevoinfo --label main ./build/noarch/*.tar.bz2
build-and-push-docker:
needs: build-and-upload-conda
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile
push: true
tags: tkchafin/autostreamtree:latest,tkchafin/autostreamtree:${{ github.event.release.tag_name }}