-
-
Notifications
You must be signed in to change notification settings - Fork 35
142 lines (122 loc) · 4.32 KB
/
release.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: release
on:
workflow_dispatch: null
push:
branches:
- main
env:
PY_COLORS: "1"
concurrency:
group: release
cancel-in-progress: false
jobs:
tag-and-release:
name: tag-and-release
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -leo pipefail {0}
outputs:
new_version: ${{ steps.version.outputs.NEXT }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: compute next version
id: version
run: |
echo "current version: "$(git describe --tags --abbrev=0)
NEXT=$(python scripts/compute_next_version.py)
echo "next version: ${NEXT}"
echo "NEXT=${NEXT}" >> "$GITHUB_OUTPUT"
- name: tag and release
run: |
python scripts/release.py "${{ steps.version.outputs.NEXT }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-push-dispatch-container:
name: build and push dispatch container
runs-on: "ubuntu-latest"
needs: tag-and-release
defaults:
run:
shell: bash -leo pipefail {0}
env:
IMAGE_NAME: condaforge/conda-forge-webservices-gha-dispatch
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29 # v1
with:
environment-file: conda-lock.yml
environment-name: webservices
condarc: |
show_channel_urls: true
channel_priority: strict
channels:
- conda-forge
- name: set up docker buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3
- name: login to docker hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
username: condaforgebot
password: ${{ secrets.CF_BOT_DH_PASSWORD }}
- name: build docker metadata
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
with:
images: condaforge/webservices-dispatch-action
flavor: |
latest=false
tags: |
type=raw,value=${{ needs.tag-and-release.outputs.new_version }}
type=raw,value=latest
- name: build and push image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
with:
context: .
file: Dockerfile_wda
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: push README to docker hub
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
DOCKER_USER: condaforgebot
DOCKER_PASS: ${{ secrets.CF_BOT_DH_PASSWORD }}
with:
destination_container_repo: condaforge/webservices-dispatch-action:${{ needs.tag-and-release.outputs.new_version }}
provider: dockerhub
short_description: "conda-forge-webservices image used to power the admin webservices GitHub Actions integrations"
readme_file: "Dockerfile_wda_README.md"
build-and-push-to-heroku:
name: build and push to heroku
runs-on: "ubuntu-latest"
needs:
- tag-and-release
- build-and-push-dispatch-container
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ needs.tag-and-release.outputs.new_version }}
- name: install heroku cli
run: |
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
- name: build and push to heroku
uses: AkhileshNS/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
with:
heroku_email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: conda-forge
usedocker: true