Merge pull request #807 from conda-forge/more-bugz #116
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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@06375d89d211a1232ef63355742e9e2e564bc7f7 # 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@c47758b77c9736f4b2ef4073d4d51994fabfe349 # 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: build and push to heroku | |
uses: gonuit/heroku-docker-deploy@9ab97585f979857642d66612a2ae4062b3347d53 | |
with: | |
email: ${{ secrets.HEROKU_EMAIL }} | |
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
heroku_app_name: conda-forge |