forked from datajoint/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
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 datajoint#25 from yambottle/main
DEV-527 DEV-598 Update reusable and starter workflow for opensource repositories, mostly elements
- Loading branch information
Showing
39 changed files
with
183 additions
and
449 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,33 @@ | ||
name: Build and Publish DevContainer Image | ||
on: | ||
workflow_call: | ||
secrets: | ||
DOCKERHUB_USERNAME: | ||
required: true | ||
DOCKERHUB_TOKEN: | ||
required: true | ||
jobs: | ||
devcontainer-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: | | ||
sudo curl https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64\ | ||
-Lo /usr/local/bin/yq | ||
sudo chmod +x /usr/local/bin/yq | ||
yq --version | ||
- name: Determine metadata | ||
run: | | ||
PIP_PACKAGE_NAME=$(ls */version.py | cut -d '/' -f 1) | ||
echo "PIP_PACKAGE_NAME=${PIP_PACKAGE_NAME}" >> $GITHUB_ENV | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
- name: Build image | ||
run: | | ||
IMAGE=$(yq eval '.services.app.image' ./.devcontainer/docker-compose.yaml) | ||
docker build -t "${IMAGE}" -f ./.devcontainer/Dockerfile . | ||
docker push "${IMAGE}" |
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
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,94 @@ | ||
name: semantic-release | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
# fixed: https://github.com/python-semantic-release/python-semantic-release/issues/721 | ||
- name: Find version.py | ||
id: find_version_dot_py | ||
run: | | ||
echo "version_dot_py_path=$(find * -name "version.py" | head -n 1)" >> $GITHUB_OUTPUT | ||
- name: Config python-semantic-release | ||
env: | ||
VERSION_DOT_PY_PATH: ${{ steps.find_version_dot_py.outputs.version_dot_py_path }} | ||
run: | | ||
cat <<EOF > .semantic-release.toml | ||
[tool.semantic_release] | ||
assets = [] | ||
build_command_env = [] | ||
commit_message = "{version}\n\nAutomatically generated by python-semantic-release" | ||
commit_parser = "angular" | ||
logging_use_named_masks = true # | ||
major_on_zero = true | ||
allow_zero_version = true | ||
no_git_verify = false | ||
tag_format = "{version}" # | ||
version_variables = [ | ||
"${VERSION_DOT_PY_PATH}:__version__" # | ||
] | ||
[tool.semantic_release.branches.main] | ||
match = "(main|master)" | ||
prerelease_token = "rc" | ||
prerelease = false | ||
[tool.semantic_release.changelog] | ||
template_dir = "templates" | ||
changelog_file = "CHANGELOG.md" | ||
exclude_commit_patterns = [] | ||
[tool.semantic_release.changelog.environment] | ||
block_start_string = "{%" | ||
block_end_string = "%}" | ||
variable_start_string = "{{" | ||
variable_end_string = "}}" | ||
comment_start_string = "{#" | ||
comment_end_string = "#}" | ||
trim_blocks = false | ||
lstrip_blocks = false | ||
newline_sequence = "\n" | ||
keep_trailing_newline = false | ||
extensions = [] | ||
autoescape = true | ||
[tool.semantic_release.commit_author] | ||
env = "GIT_COMMIT_AUTHOR" | ||
default = "semantic-release <semantic-release>" | ||
[tool.semantic_release.commit_parser_options] | ||
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"] | ||
minor_tags = ["feat"] | ||
patch_tags = ["fix", "perf"] | ||
default_bump_level = 0 | ||
[tool.semantic_release.remote] | ||
name = "origin" | ||
type = "github" | ||
ignore_token_for_push = false | ||
insecure = false | ||
[tool.semantic_release.publish] | ||
dist_glob_patterns = ["dist/*"] | ||
upload_to_vcs_release = true | ||
EOF | ||
echo "INFO::Semantic release configuration:" | ||
cat .semantic-release.toml | ||
git config --global --add safe.directory ${PWD} | ||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-c .semantic-release.toml -v" |
28 changes: 0 additions & 28 deletions
28
.staging_workflows/anchored_u24_element_before_release.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
.staging_workflows/anchored_u24_element_tag_to_release.yaml
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
.staging_workflows/anchored_u24_workflow_before_release.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.