-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2164 from OpenFAST/m/3.5.3_dev_to_dev-unstable
Merge dev to dev-unstable after 3.5.3 updates
- Loading branch information
Showing
104 changed files
with
6,823 additions
and
2,465 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# System, cache and editor files | ||
**/__pycache__ | ||
**/.DS_Store | ||
|
||
.editorconfig | ||
.idea | ||
.git | ||
.github | ||
.gitignore | ||
.pytest_cache | ||
.pre-commit-config.yaml | ||
.readthedocs.yml | ||
.coverage | ||
Procfile | ||
README.md | ||
|
||
# Never bake in environment variables | ||
.env | ||
.env* | ||
google_credentials.json | ||
# See: https://github.com/google-github-actions/auth/issues/123 | ||
gha-creds-*.json | ||
gcp-creds-*.json | ||
|
||
.devcontainer/.zsh_history | ||
share/docker |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This workflow builds an OpenFAST docker image for the linux/amd64 and linux/aarch64 architectures on merge into | ||
# `main` from a release candidate branch. The image is tagged both with "latest" and the version extracted from the | ||
# release candidate branch's name (e.g. "rc-3.5.3") before being pushed to the `nrel/openfast` repository. The build | ||
# cache is stored in GitHub actions. | ||
name: build-docker-image-automatic | ||
|
||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 300 | ||
env: | ||
DOCKERFILE_PATH: share/docker/Dockerfile | ||
DOCKERHUB_REPOSITORY: nrel/openfast | ||
GH_REGISTRY: ghcr.io/OpenFAST/openfast | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Commenting out until we get the NREL DockerHub credentials | ||
# - name: Log in to DockerHub | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.GH_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract tag from release candidate branch name | ||
id: extract-tag | ||
run: echo "openfast-tag=$(expr substr "${{ github.head_ref }}" 4 100)" >> $GITHUB_OUTPUT | ||
|
||
- name: Build and push to registry | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ${{ env.DOCKERFILE_PATH }} | ||
platforms: linux/amd64,linux/aarch64 | ||
tags: | | ||
${{ env.GH_REGISTRY }}:${{ steps.extract-tag.outputs.openfast-tag }},${{ env.DOCKERHUB_REPOSITORY }}:latest | ||
# ${{ env.DOCKERHUB_REPOSITORY }}:${{ steps.extract-tag.outputs.openfast-tag }},${{ env.DOCKERHUB_REPOSITORY }}:latest | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This manually-triggered workflow builds OpenFAST docker images for the linux/amd64 and linux/aarch64 architectures for | ||
# the specified git ref (this can be a branch, tag, or commit hash). The image is tagged with the given tag and pushed | ||
# to the `nrel/openfast` repository. The build cache is stored in GitHub actions. | ||
name: build-docker-image-manual | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Tag for Docker image (excluding the "v" prefix e.g. 3.5.3)' | ||
required: true | ||
ref: | ||
description: 'Branch, tag, or commit SHA to build from' | ||
required: true | ||
default: main | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 300 | ||
env: | ||
DOCKERFILE_PATH: share/docker/Dockerfile | ||
DOCKERFILE_PERMALINK: https://raw.githubusercontent.com/OpenFAST/openfast/main/share/docker/Dockerfile | ||
DOCKERHUB_REPOSITORY: nrel/openfast | ||
GH_REGISTRY: ghcr.io/OpenFAST/openfast | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.ref }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Commenting out until we get the NREL DockerHub credentials | ||
# - name: Log in to DockerHub | ||
# uses: docker/login-action@v3 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.GH_REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# The updated Dockerfile is only available in the repository at the tag v3.5.3 and above. To build versions of | ||
# OpenFAST that are below this version, the updated Dockerfile from that tag of the repository has to be acquired | ||
# before building. For versions >= v3.5.3, the Dockerfile is already there so this step does nothing. | ||
- name: Get Dockerfile for versions < 3.5.3 | ||
run: | | ||
if [ ! -f ${{ env.DOCKERFILE_PATH }} ]; \ | ||
then wget -O ${{ env.DOCKERFILE_PATH }} ${{ env.DOCKERFILE_PERMALINK }}; \ | ||
fi | ||
- name: Build and push to registry | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ${{ env.DOCKERFILE_PATH }} | ||
platforms: linux/amd64,linux/aarch64 | ||
tags: | | ||
${{ env.GH_REGISTRY }}:${{ github.event.inputs.tag }} | ||
# ${{ env.DOCKERHUB_REPOSITORY }}:${{ github.event.inputs.tag }} | ||
push: true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This workflow tests building an OpenFAST docker image for the linux/amd64 architecture on push to a release candidate | ||
# branch. The build cache is stored in GitHub actions. | ||
name: test-build-docker-image | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-build: | ||
if: startsWith(github.head_ref, 'rc-') | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 300 | ||
env: | ||
DOCKERFILE_PATH: share/docker/Dockerfile | ||
DOCKERHUB_REPOSITORY: nrel/openfast | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract tag from release candidate branch name | ||
id: extract-tag | ||
run: echo "openfast-tag=$(expr substr "${{ github.head_ref }}" 4 100)" >> $GITHUB_OUTPUT | ||
|
||
- name: Test building docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ${{ env.DOCKERFILE_PATH }} | ||
platforms: linux/amd64 | ||
tags: ${{ env.DOCKERHUB_REPOSITORY }}:${{ steps.extract-tag.outputs.openfast-tag }} | ||
push: false | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
Oops, something went wrong.