diff --git a/.github/workflows/container-build.yaml b/.github/workflows/container-build.yaml new file mode 100644 index 0000000..4c89b6f --- /dev/null +++ b/.github/workflows/container-build.yaml @@ -0,0 +1,60 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# This workflow is using the SHA commit for the version +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. +name: Container Build Pipeline + +# This workflow will run when the Dockerfile is changed on the main branch +# In practice it should also be updated to run when changes are made to the +# codebase included in the Dockerfile so direct changes to that create a new image +on: + push: + paths: + - Dockerfile + branches: + - main + +# This workflow only needs to read the repository contents +# Explicitly state the read permissions to align with security best practices +permissions: + contents: read + +jobs: + container-build-push: + runs-on: ubuntu-latest + steps: + # Checkout the repository contents + - name: Checkout the repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + # Login to Docker Hub so the image can be pushed + - name: Login to Docker Hub + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 + # GitHub secrets are used to provide login information to Docker Hub + # Add DOCKERHUB_USERNAME & DOCKERHUB_TOKEN + # Actions secrets are managed under Secrets and variables in the repos Settings + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # A unique image tag is required. This example uses the date and time to provide a tag + # This can be updated to utilize a GitHub release version or something similar + - name: Get current date + id: date + run: echo "date=$(date +'%Y-%m-%d.%H.%M')" >> $GITHUB_OUTPUT + # The last step builds the image with Docker, tags it with the desired name and date tag + # It utilizes the login step to then push the image to Docker Hub to the configured account + - name: Build and push image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 + with: + # Provide the current directory as build context + context: . + # Specify where the Dockerfile is located in relation to the repo base path + file: Dockerfile + # Enable the push to docker hub + push: true + # Provide the tags to apply to the image, this example uses the date tag + tags: ncar-rda/container-dev:${{ steps.date.outputs.date }} \ No newline at end of file diff --git a/LICENSE b/LICENSE index d2c03f1..05c1beb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 National Center for Atmospheric Research +Copyright (c) 2025 NSF National Center for Atmospheric Research Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in index 2673cbe..fd69b44 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include src/rda_python_template/hello_world.usg +include src/rda_python_template/*.usg diff --git a/pyproject.toml b/pyproject.toml index fcac9e7..4e7337d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,15 +23,6 @@ dependencies = [ "rda_python_common", ] -[tool.setuptools] -include-package-data = true - -[tool.setuptools.packages.find] -where = ["src"] - -[tool.setuptools.package-data] -"rda_python_tmplate" = ["hello_world.usg"] - [project.urls] "Homepage" = "https://github.com/NCAR/rda-python-template"