Skip to content

Update docker-image.yaml #5

Update docker-image.yaml

Update docker-image.yaml #5

Workflow file for this run

name: Image Build and Push
on:
push:
branches:
- ghcr-workflow
jobs:
push-to-dockerhub:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Exact branch name
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.XXX_USERNAME }}
# password: ${{ secrets.XXX_PWORD }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# with:
# context: .
# push: true
# file: ./Dockerfile
# platforms: linux/amd64
# # see https://github.com/docker/build-push-action/issues/276 for syntax help
# tags: underworldcode/underworld3:${{ env.BRANCH }} #-$(date +%s)
- name: Build and push Container to GHCR
uses: docker/build-push-action@v6
with:
context: .
push: true
file: ./docs/developer/container/Containerfile
platforms: linux/amd64
# see https://github.com/docker/build-push-action/issues/276 for syntax help
#tags: ghcr.io/underworldcode/underworld3:${{ env.BRANCH }} #-$(date +%s)
tags: ghcr.io/underworldcode/underworld3:${{ env.BRANCH }} #-$(date +%s)