mirror of
https://github.com/vlang/v.git
synced 2025-09-18 20:07:02 -04:00
ci: add cache and trigger for pushes, in the Hub docker action (#22314)
This commit is contained in:
parent
e3084ba636
commit
956f74ab95
16
.github/workflows/hub_docker_ci.yml
vendored
16
.github/workflows/hub_docker_ci.yml
vendored
@ -2,6 +2,10 @@ name: hub_docker_ci
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '[0-9].[0-9]+.[0-9]+' # trigger on new release tag
|
||||||
|
- 'weekly.*' # trigger on weekly tag
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-new-docker-images:
|
publish-new-docker-images:
|
||||||
@ -35,17 +39,19 @@ jobs:
|
|||||||
echo 'TAGS=thevlang/vlang:${{ matrix.os }}' >> $GITHUB_OUTPUT
|
echo 'TAGS=thevlang/vlang:${{ matrix.os }}' >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: docker/build-push-action@v4
|
- uses: docker/build-push-action@v6
|
||||||
name: Build and deploy v image
|
name: Build and deploy v image
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: ${{ steps.gen_tags.outputs.TAGS }}
|
tags: ${{ steps.gen_tags.outputs.TAGS }}
|
||||||
file: docker/vlang/Dockerfile.${{ matrix.os }}
|
file: docker/vlang/Dockerfile.${{ matrix.os }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: true
|
||||||
build-args: 'USER=thevlang'
|
build-args: 'USER=thevlang'
|
||||||
|
cache-from: type=registry,ref=thevlang/vlang:${{ matrix.os }}-buildcache
|
||||||
|
cache-to: type=registry,ref=thevlang/vlang:${{ matrix.os }}-buildcache,mode=max
|
||||||
|
|
||||||
- uses: docker/build-push-action@v4
|
- uses: docker/build-push-action@v6
|
||||||
name: Build and deploy developer build
|
name: Build and deploy developer build
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@ -53,4 +59,6 @@ jobs:
|
|||||||
tags: thevlang/vlang:${{ matrix.os }}-dev
|
tags: thevlang/vlang:${{ matrix.os }}-dev
|
||||||
file: docker/vlang/Dockerfile.${{ matrix.os }}.dev-full
|
file: docker/vlang/Dockerfile.${{ matrix.os }}.dev-full
|
||||||
build-args: 'USER=thevlang'
|
build-args: 'USER=thevlang'
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: true
|
||||||
|
cache-from: type=registry,ref=thevlang/vlang:${{ matrix.os }}-dev-buildcache
|
||||||
|
cache-to: type=registry,ref=thevlang/vlang:${{ matrix.os }}-dev-buildcache,mode=max
|
||||||
|
Loading…
x
Reference in New Issue
Block a user