Skip to content

Commit

Permalink
Clean up container labels, creation
Browse files Browse the repository at this point in the history
  • Loading branch information
brews authored Aug 9, 2023
1 parent 1564ff3 commit 78db949
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 86 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/buildpush.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/buildpushrelease.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/container-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Upload container image

on:
push:
branches:
- 'main'
tags:
- 'v*'

env:
REGISTRY_NAME: ghcr.io/climateimpactlab
IMAGE_NAME: dodola

jobs:
buildpush:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME }}
tags: |
type=edge
type=semver,pattern={{version}}
- name: Docker login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_NAME }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Test coverage for container tests in CI. (PR #188, PR #191, @brews)
- Add `org.opencontainers.image` labels with metadata to container. (PR #195, @brews)
### Changed
- Bleeding-edge development container now uses "edge" tag. (@brews)
- Minor clarifications to docs and comments. (PR #232, @brews)
- Migrate parent container from `miniconda3` to `micromamba`. Note this is a significant change to the container environment which may break scripts run in the container. In addition, the containers entry point has changed, breaking backwards compatibility for Argo Workflows running with Emissary executors. (PR #195, @brews)
- Migrate Python package metadata and dependencies from `setup.cfg` to `pyproject.toml`. Note the runtime environment used in the container is still `environment.yaml`. (PR #195, @brews)
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
FROM mambaorg/micromamba:1.4.9

LABEL org.opencontainers.image.title="dodola"
LABEL org.opencontainers.image.url="https://github.com/ClimateImpactLab/dodola"
LABEL org.opencontainers.image.source="https://github.com/ClimateImpactLab/dodola"

COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /tmp/env.yaml
RUN micromamba install -y -f /tmp/env.yaml && \
micromamba clean --all --yes
Expand Down

0 comments on commit 78db949

Please sign in to comment.