1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2025-02-19 19:10:26 +02:00

Update docker-publish-github.yml

This commit is contained in:
Bill Plein 2023-03-15 11:47:30 -05:00 committed by GitHub
parent c467163130
commit 5b80d7192b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,18 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Extract all versions from buildinfo.json
id: get-version
run: |
VERSION=$(jq -r '.[] | .tags | select( index("latest"))|.[0]' buildinfo.json)
tags=$(jq -r '.[] | .tags | select( index("latest"))|.[0]' buildinfo.json)
- name: Show versions
run: |
tags="${{ steps.get-version.outputs.value }}"
for tag in $tags; do
echo "tag: $tag"
done
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
@ -74,7 +86,8 @@ jobs:
with:
context: ./docker/
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
# tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.get-version.outputs.value }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max