Skip to content

A few more doc fixes (#1633) #658

A few more doc fixes (#1633)

A few more doc fixes (#1633) #658

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@v3
- name: Install buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2
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@v4
with:
context: deployment/docker
pull: true
load: true
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@v4
if: ${{ github.repository_owner == 'OGGM' }}
with:
context: deployment/docker
push: true
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 }}