Bugfix in merge_gridded_data (#1697) #10
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: 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@v5 | |
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@v5 | |
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 }} |