mirror of
https://github.com/wekan/wekan.git
synced 2026-01-02 15:48:49 +01:00
Refactor Docker image tagging to use short commit SHA for better readability
This commit is contained in:
parent
3a4aa02e8b
commit
72d89164e6
1 changed files with 4 additions and 2 deletions
6
.github/workflows/e2e-testing.yml
vendored
6
.github/workflows/e2e-testing.yml
vendored
|
|
@ -22,14 +22,16 @@ jobs:
|
|||
# Login to DockerHub
|
||||
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
|
||||
TAG="${{ github.sha }}-$(date +%Y%m%d-%H%M%S)"
|
||||
# Use short commit SHA (first 7 characters)
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
TAG="${SHORT_SHA}-$(date +%Y%m%d-%H%M%S)"
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/wekan:$TAG .
|
||||
|
||||
docker push ${{ secrets.DOCKERHUB_USERNAME }}/wekan:$TAG
|
||||
|
||||
# Save the tag for later *steps* (if you need the tag value in another JOB, use artifacts, as seen in class)
|
||||
# Save the tag for later steps
|
||||
echo "WEKAN_IMAGE_TAG=$TAG" >> $GITHUB_ENV
|
||||
|
||||
- name: Copy docker-compose file to EC2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue