V0 4 4 release #443
Workflow file for this run
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: 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 |