Skip to content

Release v1.6.2

Release v1.6.2 #747

Workflow file for this run

name: Build Docker-Image
on:
push:
branches:
- master
repository_dispatch:
types: [build-docker-image]
jobs:
build-docker-image:
runs-on: ubuntu-latest
name: Build Docker Image
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Set Names
id: names
run: |
echo "name=ghcr.io/oggm/oggm" >> $GITHUB_OUTPUT
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
echo "sha=$GITHUB_SHA" >> $GITHUB_OUTPUT
- name: Stop Commands
run: T="$(echo -n ${{ github.token }} | sha256sum | head -c 64)" && echo -e "::add-mask::${T}\n::stop-commands::${T}"
- name: Build image
uses: docker/build-push-action@v6
with:
context: deployment/docker
pull: true
load: true
provenance: false
build-args: |
GITHUB_SHA=${{ github.sha }}
GITHUB_REPOSITORY=${{ github.repository }}
tags: |
${{ steps.names.outputs.name }}:test
- name: Test image
run: docker run --rm ${{ steps.names.outputs.name }}:test /root/test.sh
- name: Push image
uses: docker/build-push-action@v6
if: ${{ github.repository_owner == 'OGGM' }}
with:
context: deployment/docker
push: true
provenance: false
build-args: |
GITHUB_SHA=${{ github.sha }}
GITHUB_REPOSITORY=${{ github.repository }}
tags: |
${{ steps.names.outputs.name }}:latest
${{ steps.names.outputs.name }}:${{ steps.names.outputs.date }}
${{ steps.names.outputs.name }}:${{ steps.names.outputs.sha }}