diff options
author | Andrew Dolgov <[email protected]> | 2023-03-25 20:23:50 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-03-25 20:37:25 +0300 |
commit | 0bb1edbd5ac6b37d7a739df5a9639018f289ba35 (patch) | |
tree | 6784edb2989ca2967a2b2f7f95b514ef35df8101 /.gitea/workflows/build.yml | |
parent | 7e8a37144d0a8852983cc675af5686c92ed07f1c (diff) |
use unified job setup
Diffstat (limited to '.gitea/workflows/build.yml')
-rw-r--r-- | .gitea/workflows/build.yml | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 00e723a..52098d7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -13,7 +13,7 @@ defaults: shell: sh jobs: - build: + build-internal: runs-on: alpine-3.16 steps: - uses: https://gitea.com/actions/checkout@v3 @@ -73,3 +73,46 @@ jobs: registry-rw.fakecake.org/cthulhoo/the-epube-fpm-static:latest registry-rw.fakecake.org/cthulhoo/the-epube-fpm-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 }} + context: .docker/web-nginx + tags: | + cthulhoo/the-epube-web-nginx:latest + cthulhoo/the-epube-web-nginx:${{ env.BUILD_TAG }} + provenance: false + + - name: build dict image + uses: https://github.com/docker/build-push-action@v4 + with: + push: ${{ !!secrets.REGISTRY_GITHUB_PUSH_ENABLED }} + context: .docker/dict + tags: | + cthulhoo/the-epube-dict:latest + cthulhoo/the-epube-dict:${{ env.BUILD_TAG }} + provenance: false + + - name: build app image + uses: https://github.com/docker/build-push-action@v4 + with: + push: ${{ !!secrets.REGISTRY_GITHUB_PUSH_ENABLED }} + context: .docker/app + build-contexts: + app-src=. + tags: | + cthulhoo/the-epube-fpm-static:latest + cthulhoo/the-epube-fpm-static:${{ env.BUILD_TAG }} + provenance: false |