mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Refactor CI workflow to update version.py with build timestamp in Dockerfile
This commit is contained in:
parent
a81daaea44
commit
07edf270fb
2 changed files with 13 additions and 11 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -50,15 +50,6 @@ jobs:
|
|||
TIMESTAMP=$(date -u +'%Y%m%d%H%M%S')
|
||||
echo "timestamp=${TIMESTAMP}" >> $GITHUB_OUTPUT
|
||||
|
||||
# Update the timestamp in version.py
|
||||
echo "Updating timestamp to ${TIMESTAMP} in version.py"
|
||||
sed -i "s|__timestamp__ = None.*|__timestamp__ = '${TIMESTAMP}' # Set during CI/CD build process|" version.py
|
||||
cat version.py # Verify the file was updated correctly
|
||||
|
||||
# Make the version.py change part of the Docker build context
|
||||
git add version.py
|
||||
git commit -m "Update build timestamp [skip ci]" || echo "No changes to commit"
|
||||
|
||||
- name: Extract version info
|
||||
id: version
|
||||
run: |
|
||||
|
|
@ -111,4 +102,5 @@ jobs:
|
|||
build-args: |
|
||||
BRANCH=${{ github.ref_name }}
|
||||
REPO_URL=https://github.com/${{ github.repository }}
|
||||
TIMESTAMP=${{ steps.timestamp.outputs.timestamp }}
|
||||
file: ./docker/Dockerfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue