Merge pull request #259 from ClimateImpactLab/dependabot/docker/mamba… #27
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: 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@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=edge | |
type=semver,pattern={{version}} | |
- name: Docker login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY_NAME }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |