Skip to content

relock w/ conda-lock (#5386) #1911

relock w/ conda-lock (#5386)

relock w/ conda-lock (#5386) #1911

Workflow file for this run

name: release
on:
workflow_dispatch: null
push:
branches:
- main
env:
PY_COLORS: "1"
REGISTRY: ghcr.io
IMAGE_NAME: regro/conda-forge-tick
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: release
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- name: free disk space
uses: endersonmenezes/free-disk-space@e6ed9b02e683a3b55ed0252f1ee469ce3b39a885 # v3
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
rm_cmd: "rmz"
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2.0.7
with:
environment-file: conda-lock.yml
environment-name: cf-scripts
condarc-file: autotick-bot/condarc
- name: stop me if needed
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
python autotick-bot/stop_me_if_needed.py
- name: compute next version
id: version
if: ${{ ! env.CI_SKIP }}
run: |
echo "recent version tags: "$(git tag --sort=committerdate | tail -4)
NEXT=$(python autotick-bot/compute_next_version.py)
echo "next version: ${NEXT}"
echo "NEXT=${NEXT}" >> "$GITHUB_OUTPUT"
- name: log into ghcr.io
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
if: ${{ ! env.CI_SKIP }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build docker metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
if: ${{ ! env.CI_SKIP }}
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
tags: |
type=raw,value=${{ steps.version.outputs.NEXT }}
type=raw,value=latest
- name: build and push image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
if: ${{ ! env.CI_SKIP }}
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: tag and release
if: ${{ ! env.CI_SKIP }}
run: |
python autotick-bot/release.py "${{ steps.version.outputs.NEXT }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}