Skip to content

Merge pull request #698 from conda-forge/move-everything #25

Merge pull request #698 from conda-forge/move-everything

Merge pull request #698 from conda-forge/move-everything #25

Workflow file for this run

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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # 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@988b5a0280414f521da01fcc63a27aeeb4b104db # 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@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # 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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # 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@692973e3d937129bcbf40652eb9f2f61becf3332 # 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