Skip to content

Commit 12d0f8b

Browse files
authored
Merge pull request #11 from NCAR/main
transfer changes to branch hua-work-template
2 parents 7269c61 + f9b534b commit 12d0f8b

File tree

4 files changed

+62
-11
lines changed

4 files changed

+62
-11
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# This workflow is using the SHA commit for the version
8+
# To get a newer version, you will need to update the SHA.
9+
# You can also reference a tag or branch, but the action may change without warning.
10+
name: Container Build Pipeline
11+
12+
# This workflow will run when the Dockerfile is changed on the main branch
13+
# In practice it should also be updated to run when changes are made to the
14+
# codebase included in the Dockerfile so direct changes to that create a new image
15+
on:
16+
push:
17+
paths:
18+
- Dockerfile
19+
branches:
20+
- main
21+
22+
# This workflow only needs to read the repository contents
23+
# Explicitly state the read permissions to align with security best practices
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
container-build-push:
29+
runs-on: ubuntu-latest
30+
steps:
31+
# Checkout the repository contents
32+
- name: Checkout the repo
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
# Login to Docker Hub so the image can be pushed
35+
- name: Login to Docker Hub
36+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
37+
# GitHub secrets are used to provide login information to Docker Hub
38+
# Add DOCKERHUB_USERNAME & DOCKERHUB_TOKEN
39+
# Actions secrets are managed under Secrets and variables in the repos Settings
40+
with:
41+
username: ${{ secrets.DOCKERHUB_USERNAME }}
42+
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
# A unique image tag is required. This example uses the date and time to provide a tag
44+
# This can be updated to utilize a GitHub release version or something similar
45+
- name: Get current date
46+
id: date
47+
run: echo "date=$(date +'%Y-%m-%d.%H.%M')" >> $GITHUB_OUTPUT
48+
# The last step builds the image with Docker, tags it with the desired name and date tag
49+
# It utilizes the login step to then push the image to Docker Hub to the configured account
50+
- name: Build and push image
51+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
52+
with:
53+
# Provide the current directory as build context
54+
context: .
55+
# Specify where the Dockerfile is located in relation to the repo base path
56+
file: Dockerfile
57+
# Enable the push to docker hub
58+
push: true
59+
# Provide the tags to apply to the image, this example uses the date tag
60+
tags: ncar-rda/container-dev:${{ steps.date.outputs.date }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 National Center for Atmospheric Research
3+
Copyright (c) 2025 NSF National Center for Atmospheric Research
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include src/rda_python_template/hello_world.usg
1+
include src/rda_python_template/*.usg

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ dependencies = [
2323
"rda_python_common",
2424
]
2525

26-
[tool.setuptools]
27-
include-package-data = true
28-
29-
[tool.setuptools.packages.find]
30-
where = ["src"]
31-
32-
[tool.setuptools.package-data]
33-
"rda_python_tmplate" = ["hello_world.usg"]
34-
3526
[project.urls]
3627
"Homepage" = "https://github.com/NCAR/rda-python-template"
3728

0 commit comments

Comments
 (0)