Skip to content

Merge pull request #558 from NREL/501_yscan_array #427

Merge pull request #558 from NREL/501_yscan_array

Merge pull request #558 from NREL/501_yscan_array #427

Workflow file for this run

name: Push Docker image to GitHub Pack Registry
on:
push:
# Publish `main` as Docker `latest` image.
branches:
- development
# Publish `v1.2.3` tags as releases.
# tags:
# Run tests for any PRs.
pull_request:
# Allow running this action on demand
workflow_dispatch:
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
jobs:
build-and-push-docker-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Print triggering event info
run: |
echo "${{ github.actor }} triggered run #${{ github.run_number }} with event type ${{ github.event_name }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_NREL_USER }}
password: ${{ secrets.DOCKERHUB_NREL_TOKEN }}
- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
nrel/bifacial_radiance:latest
ghcr.io/nrel/bifacial_radiance:latest