Development2 #260
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@v2 | |
- 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@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_NREL_USER }} | |
password: ${{ secrets.DOCKERHUB_NREL_TOKEN }} | |
- name: Login to GitHub Package Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
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 |