forked from LiamAEdwards/SS14-Docker-Linux-Server
Always rebuild docker image in CI
This commit is contained in:
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@@ -52,20 +52,7 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USERNAME || github.actor }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Check for existing image
|
||||
id: image-check
|
||||
env:
|
||||
TARGET_TAG: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.wylab.outputs.commit }}
|
||||
run: |
|
||||
if docker manifest inspect "$TARGET_TAG" >/dev/null 2>&1; then
|
||||
echo "exists=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Image $TARGET_TAG already exists; skipping build."
|
||||
else
|
||||
echo "exists=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: ${{ steps.image-check.outputs.exists != 'true' }}
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
with:
|
||||
context: .
|
||||
|
||||
Reference in New Issue
Block a user