shorten pipeline
This commit is contained in:
parent
c41c1bd353
commit
0c42d99a93
|
@ -55,66 +55,34 @@ jobs:
|
||||||
- run: echo REPO_COMMIT_FULL=$(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
|
- run: echo BUILD_TAG=$(date -d @${REPO_TIMESTAMP} +%y.%m)-${REPO_COMMIT} >> $GITHUB_ENV
|
||||||
|
|
||||||
- run: apk add --no-cache docker-cli
|
|
||||||
|
|
||||||
- name: setup qemu
|
- name: setup qemu
|
||||||
uses: https://github.com/docker/setup-qemu-action@v2
|
uses: https://github.com/docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: setup buildx
|
- name: setup buildx
|
||||||
uses: https://github.com/docker/setup-buildx-action@v2
|
uses: https://github.com/docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: login into registry
|
- name: login to registry
|
||||||
run: |
|
uses: https://github.com/docker/login-action@v2
|
||||||
BASE64_AUTH=`echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64`
|
with:
|
||||||
mkdir -p ~/.docker
|
registry: ${{ secrets.REGISTRY_HOST }}
|
||||||
echo "{\"auths\": {\"registry-rw.fakecake.org\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
env:
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
- name: login to docker hub
|
||||||
if: ${{ !!secrets.REGISTRY_PUSH_ENABLED }}
|
uses: https://github.com/docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
|
|
||||||
- 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: ${{ !!secrets.REGISTRY_PUSH_ENABLED }}
|
push: true
|
||||||
platforms: linux/amd64
|
|
||||||
context: .docker/web-nginx
|
|
||||||
tags: |
|
|
||||||
registry-rw.fakecake.org/cthulhoo/ttrss-web-nginx:latest
|
|
||||||
registry-rw.fakecake.org/cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
|
||||||
provenance: false
|
|
||||||
|
|
||||||
- name: build app image
|
|
||||||
uses: https://github.com/docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
push: ${{ !!secrets.REGISTRY_PUSH_ENABLED }}
|
|
||||||
platforms: linux/amd64
|
|
||||||
context: .docker/app
|
|
||||||
build-contexts:
|
|
||||||
app-src=.
|
|
||||||
tags: |
|
|
||||||
registry-rw.fakecake.org/cthulhoo/ttrss-fpm-pgsql-static:latest
|
|
||||||
registry-rw.fakecake.org/cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
|
||||||
provenance: false
|
|
||||||
|
|
||||||
- name: login into docker hub
|
|
||||||
run: |
|
|
||||||
BASE64_AUTH=`echo -n "$REGISTRY_USER:$REGISTRY_PASSWORD" | base64`
|
|
||||||
mkdir -p ~/.docker
|
|
||||||
echo "{\"auths\": {\"$REGISTRY_HOST\": {\"auth\": \"$BASE64_AUTH\"}}}" > ~/.docker/config.json
|
|
||||||
env:
|
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_GITHUB_USER }}
|
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_GITHUB_ACCESS_TOKEN }}
|
|
||||||
REGISTRY_HOST: https://index.docker.io/v1/
|
|
||||||
if: ${{ !!secrets.REGISTRY_GITHUB_PUSH_ENABLED }}
|
|
||||||
|
|
||||||
- name: build web-nginx image
|
|
||||||
uses: https://github.com/docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
push: ${{ !!secrets.REGISTRY_GITHUB_PUSH_ENABLED }}
|
|
||||||
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: |
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx:latest
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
||||||
cthulhoo/ttrss-web-nginx:latest
|
cthulhoo/ttrss-web-nginx:latest
|
||||||
cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
cthulhoo/ttrss-web-nginx:${{ env.BUILD_TAG }}
|
||||||
provenance: false
|
provenance: false
|
||||||
|
@ -122,12 +90,14 @@ jobs:
|
||||||
- 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:
|
||||||
push: ${{ !!secrets.REGISTRY_GITHUB_PUSH_ENABLED }}
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
context: .docker/app
|
context: .docker/app
|
||||||
build-contexts:
|
build-contexts:
|
||||||
app-src=.
|
app-src=.
|
||||||
tags: |
|
tags: |
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static:latest
|
||||||
|
${{ secrets.REGISTRY_HOST }}/cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
||||||
cthulhoo/ttrss-fpm-pgsql-static:latest
|
cthulhoo/ttrss-fpm-pgsql-static:latest
|
||||||
cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
cthulhoo/ttrss-fpm-pgsql-static:${{ env.BUILD_TAG }}
|
||||||
provenance: false
|
provenance: false
|
||||||
|
|
Loading…
Reference in New Issue