Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ci rc #31

Merged
merged 59 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b82d1b1
updates CI
saxix May 28, 2024
e0ab1c7
updates CI
saxix May 28, 2024
1fd5e87
updates CI
saxix May 28, 2024
3d9a122
updates CI
saxix May 28, 2024
63f2f22
updates CI
saxix May 28, 2024
b2da4af
updates CI
saxix May 28, 2024
86bb8cd
updates CI
saxix May 28, 2024
3913d48
updates CI
saxix May 28, 2024
1b6ce75
updates CI
saxix May 28, 2024
327c80c
add ops workflows
saxix Jun 11, 2024
2ea72db
Merge remote-tracking branch 'origin/develop' into feature/ci_rc
saxix Jun 11, 2024
948b950
updates lint config
saxix Jun 11, 2024
e1e1dfc
updates add ops actions
saxix Jun 11, 2024
9051f54
updates add ops actions
saxix Jun 11, 2024
a85e61b
updates add ops actions
saxix Jun 11, 2024
da3746a
add codeql
saxix Jun 11, 2024
fb27902
updates ops
saxix Jun 11, 2024
057e189
updates lint workflow
saxix Jun 11, 2024
d7c781e
updates image_updated action
saxix Jun 11, 2024
193b83d
updates Dockerifle
saxix Jun 11, 2024
447f581
updates CI ci:debug
saxix Jun 11, 2024
5da53ab
updates CI ci:debug
saxix Jun 12, 2024
7c8e14b
updates CI ci:debug
saxix Jun 12, 2024
54eb8de
updates CI ci:debug
saxix Jun 12, 2024
3109672
- updates ci:debug
saxix Jun 12, 2024
aead377
2024-06-12 06:17 - updates ci:debug
saxix Jun 12, 2024
44dda20
2024-06-12 06:18 - updates ci:debug
saxix Jun 12, 2024
043c308
2024-06-12 06:21 - updates ci:debug
saxix Jun 12, 2024
7383c24
2024-06-12 06:22 - updates ci:debug
saxix Jun 12, 2024
36ffca4
2024-06-12 06:38 - updates ci:debug
saxix Jun 12, 2024
6c994b7
2024-06-12 06:52 - updates ci:debug
saxix Jun 12, 2024
125bc70
2024-06-12 07:01 - updates ci:debug
saxix Jun 12, 2024
dbd1bbc
2024-06-12 07:16 - updates ci:debug
saxix Jun 12, 2024
6acc9c5
2024-06-12 07:57 - updates ci:debug
saxix Jun 12, 2024
db52bf3
2024-06-12 10:14 - updates ci:debug
saxix Jun 12, 2024
42246da
2024-06-12 10:52 - updates ci:debug
saxix Jun 12, 2024
78524e9
2024-06-12 10:54 - updates ci:debug
saxix Jun 12, 2024
477c8c4
2024-06-12 14:03 - updates ci:debug
saxix Jun 12, 2024
e4199c3
2024-06-12 14:05 - updates ci:debug
saxix Jun 12, 2024
ace3b44
2024-06-12 14:35 - updates ci:debug
saxix Jun 12, 2024
638ea53
2024-06-12 15:01 - updates ci:debug
saxix Jun 12, 2024
1abfdc1
2024-06-12 17:23 - updates ci:debug
saxix Jun 12, 2024
07e5c24
2024-06-12 17:25
saxix Jun 12, 2024
4bf1fb8
2024-06-12 17:28
saxix Jun 12, 2024
ea8f5b4
2024-06-12 18:00
saxix Jun 12, 2024
2a7b2f0
2024-06-12 18:06
saxix Jun 12, 2024
f75febb
2024-06-12 18:23
saxix Jun 12, 2024
2ac94c6
2024-06-12 18:45
saxix Jun 12, 2024
e0ee910
2024-06-12 19:53
saxix Jun 12, 2024
3ec7fbb
2024-06-12 20:00
saxix Jun 12, 2024
55c65a3
2024-06-12 20:10
saxix Jun 12, 2024
11e3f97
2024-06-12 20:14
saxix Jun 12, 2024
b5c9dc4
2024-06-12 20:15
saxix Jun 12, 2024
678cd6c
2024-06-12 20:18
saxix Jun 12, 2024
3af3955
2024-06-13 05:42
saxix Jun 13, 2024
13ee5cc
2024-06-13 05:43
saxix Jun 13, 2024
ddf54d0
2024-06-13 05:46 - updates
saxix Jun 13, 2024
3b4e45f
2024-06-13 05:51 - updates
saxix Jun 13, 2024
c689361
updates CI ci:debug
saxix Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[bumpversion]
commit = False
tag = False
allow_dirty = True
tag_name = {new_version}
current_version = 0.1.0
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
(-?(?P<prekind>(rc|final))
(?P<pre>\d+) # pre-release version num
)?
serialize =
{major}.{minor}.{patch}-{prekind}{pre}
{major}.{minor}.{patch}

[bumpversion:file:pyproject.toml]

[bumpversion:part:prekind]
optional_value = _
values =
_
rc
_
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_workflows/*
21 changes: 21 additions & 0 deletions .github/actions/distro_hash/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ref: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
name: 'Calculate Release Hash'
description: 'Calculate deps and os hash'
inputs:
files:
description: 'Files to use to calculate the hash'
required: true
default: "pdm.lock docker/bin/* docker/conf/* docker/Dockerfile"
outputs:
hash: # id of output
description: 'The time we greeted you'
value: ${{ steps.calc.outputs.hash }}

runs:
using: 'composite'
steps:
- id: calc
shell: bash
run: |
LOCK_SHA=$(sha1sum ${{ inputs.files }} | sha1sum | awk '{print $1}' | cut -c 1-8)
echo "hash=$LOCK_SHA" >> "$GITHUB_OUTPUT"
54 changes: 54 additions & 0 deletions .github/actions/docker_build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ref: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
name: 'Calculate version hash'
description: 'Calculate deps and os hash'
inputs:
username:
description: ''
required: true
password:
description: ''
required: true
image:
description: ''
required: true
target:
description: ''
required: true


runs:
using: 'composite'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
tags: ${{vars.DOCKER_IMAGE}}:dev-latest
file: ./docker/Dockerfile
platforms: linux/amd64
cache-from: type=registry,ref=${{vars.DOCKER_IMAGE}}:dev-latest
cache-to: type=inline
outputs: type=registry
target: python_dev_deps
build-args: |
BUILD_DATE="${{ steps.build_date.outputs.date }}"
CHECKSUM="${{ steps.release_hash.outputs.hash }}"
VERSION="${{ steps.version.outputs.version }}"

- name: Calculate Release Hash
id: calc
shell: bash
run: |
docker pull ${{inputs.image}}
echo "----------"
docker inspect --format='{{json .Config.Labels}}' ${{inputs.image}}}}:dev-latest
docker run -t ${{inputs.image}}}}:dev-latest release-info.sh
echo "----------"
34 changes: 34 additions & 0 deletions .github/actions/docker_info/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# ref: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
name: 'Retrieve Docker Image Information'
description: 'Calculate deps and os hash'
inputs:
image:
description: 'Files to use to calculate the hash'
required: true
username:
description: ''
required: true
password:
description: ''
required: true

runs:
using: 'composite'
steps:
# - name: Configure Git
# shell: bash
# run: git config --global --add safe.directory $(realpath .)
# - name: ch
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: docker/login-action@v3
with:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: Calculate Release Hash
shell: bash
run: |
docker pull ${{inputs.image}}
echo "----------"
docker inspect --format='{{json .Config.Labels}}' ${{inputs.image}}
docker run -t ${{inputs.image}} release-info.sh
echo "----------"
51 changes: 51 additions & 0 deletions .github/actions/env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'version'
description: ''

outputs:
stage:
description: ''
value: ${{ steps.version.outputs.stage }}
version:
description: ''
value: ${{ steps.version.outputs.version }}
commit:
description: ''
value: ${{ steps.version.outputs.commit }}
release:
description: ''
value: ${{ steps.version.outputs.release }}
date:
description: ''
value: ${{ steps.build_date.outputs.date }}
today:
description: ''
value: ${{ steps.build_date.outputs.today }}
timestamp:
description: ''
value: ${{ steps.build_date.outputs.timestamp }}
branch:
description: ''
value: ${{ steps.extract_branch.outputs.branch }}


runs:
using: 'composite'
steps:
- shell: bash --noprofile --norc -eo pipefail {0}
run: git config --global --add safe.directory $(realpath .)
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: version
uses: ./.github/actions/version
- id: extract_branch
name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- id: build_date
shell: bash --noprofile --norc -eo pipefail -ux {0}
run: |
d1=$(date +"%a,%e %b %Y %H:%M %Z")
d2=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
d3=$(date -u +"%Y%m%d%H%M%S")
echo "today=$d1" >> $GITHUB_OUTPUT
echo "date=$d2" >> $GITHUB_OUTPUT
echo "timestamp=$d3" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/actions/image_exists/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ runs:
else
echo "exists=false" >> "$GITHUB_OUTPUT"
echo "Image ${{inputs.image}} does not exist"
fi
fi
Loading
Loading