use action for image meta
This commit is contained in:
parent
a0b52caced
commit
33a3672eab
|
@ -49,11 +49,6 @@ jobs:
|
||||||
path: /tmp/phpstan
|
path: /tmp/phpstan
|
||||||
key: ${{ steps.cache-phpstan.outputs.cache-primary-key }}
|
key: ${{ steps.cache-phpstan.outputs.cache-primary-key }}
|
||||||
|
|
||||||
- run: echo REPO_TIMESTAMP=$(git --git-dir '.git' --no-pager log --pretty='%ct' -n1 HEAD) >> $GITHUB_ENV
|
|
||||||
- run: echo REPO_COMMIT=$(git --git-dir '.git' --no-pager log --pretty='%h' -n1 HEAD) >> $GITHUB_ENV
|
|
||||||
- run: echo REPO_COMMIT_FULL=$(git --git-dir '.git' --no-pager log --pretty='%H' -n1 HEAD) >> $GITHUB_ENV
|
|
||||||
- run: echo BUILD_TAG=$(date -d @${REPO_TIMESTAMP} +%y.%m)-${REPO_COMMIT} >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: setup qemu
|
- name: setup qemu
|
||||||
uses: https://github.com/docker/setup-qemu-action@v2
|
uses: https://github.com/docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
@ -73,19 +68,38 @@ jobs:
|
||||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: get docker meta for web-nginx
|
||||||
|
id: meta_web_nginx
|
||||||
|
uses: https://github.com/docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx
|
||||||
|
cthulhoo/ttrss-web-nginx
|
||||||
|
tags: |
|
||||||
|
type=sha,prefix={{ date 'YY.MM-' tz='UTC'}}
|
||||||
|
type=raw,value=latest,enable={{ is_default_branch }}
|
||||||
|
|
||||||
- name: build web-nginx image
|
- name: build web-nginx image
|
||||||
uses: https://github.com/docker/build-push-action@v4
|
uses: https://github.com/docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
context: .docker/web-nginx
|
context: .docker/web-nginx
|
||||||
tags: |
|
tags: ${{ steps.meta_web_nginx.outputs.tags }}
|
||||||
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx:latest
|
labels: ${{ steps.meta_web_nginx.outputs.labels }}
|
||||||
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
|
||||||
cthulhoo/ttrss-web-nginx:latest
|
|
||||||
cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
|
||||||
provenance: false
|
provenance: false
|
||||||
|
|
||||||
|
- name: get docker meta for app
|
||||||
|
id: meta_app
|
||||||
|
uses: https://github.com/docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static
|
||||||
|
cthulhoo/ttrss-fpm-pgsql-static
|
||||||
|
tags: |
|
||||||
|
type=sha,prefix={{ date 'YY.MM-' tz='UTC'}}
|
||||||
|
type=raw,value=latest,enable={{ is_default_branch }}
|
||||||
|
|
||||||
- name: build app image
|
- name: build app image
|
||||||
uses: https://github.com/docker/build-push-action@v4
|
uses: https://github.com/docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
@ -94,9 +108,6 @@ jobs:
|
||||||
context: .docker/app
|
context: .docker/app
|
||||||
build-contexts:
|
build-contexts:
|
||||||
app-src=.
|
app-src=.
|
||||||
tags: |
|
tags: ${{ steps.meta_app.outputs.tags }}
|
||||||
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static:latest
|
labels: ${{ steps.meta_app.outputs.labels }}
|
||||||
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
|
||||||
cthulhoo/ttrss-fpm-pgsql-static:latest
|
|
||||||
cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
|
||||||
provenance: false
|
provenance: false
|
||||||
|
|
Loading…
Reference in New Issue