mirror of
https://github.com/icereed/paperless-gpt.git
synced 2025-03-13 13:18:02 -05:00
fix: update Docker image tag logic for pull requests and tags (#177)
This commit is contained in:
parent
78ecc12335
commit
d8e673c1a7
1 changed files with 11 additions and 1 deletions
12
.github/workflows/docker-build-and-push.yml
vendored
12
.github/workflows/docker-build-and-push.yml
vendored
|
@ -215,6 +215,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Set PAPERLESS_GPT_IMAGE
|
||||||
|
run: |
|
||||||
|
if [ "${GITHUB_EVENT_NAME}" = "pull_request" ]; then
|
||||||
|
IMAGE="icereed/paperless-gpt:pr-${GITHUB_SHA}-amd64"
|
||||||
|
elif [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
||||||
|
IMAGE="icereed/paperless-gpt:${GITHUB_REF_NAME}-amd64"
|
||||||
|
else
|
||||||
|
IMAGE="icereed/paperless-gpt:unreleased-amd64"
|
||||||
|
fi
|
||||||
|
echo "PAPERLESS_GPT_IMAGE=${IMAGE}" >> $GITHUB_ENV
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
@ -230,7 +240,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
PAPERLESS_GPT_IMAGE: icereed/paperless-gpt:pr-${{ github.sha }}-amd64
|
PAPERLESS_GPT_IMAGE: ${{ env.PAPERLESS_GPT_IMAGE }}
|
||||||
- name: Upload Playwright Report
|
- name: Upload Playwright Report
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
Loading…
Reference in a new issue