Build onlyoffice-api #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DocSpace main test main-buil-test.yml | |
on: | |
push: | |
branches: | |
- 'feature/add-arm-build' | |
- 'develop' | |
paths: | |
- '.github/workflows/main-build-4testing.yml' | |
workflow_dispatch: | |
env: | |
DOCKER_PATH: "/install/docker" | |
REPO: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKER_IMAGE_PREFIX: "4testing-docspace" | |
DOCKERFILE: "Dockerfile.app" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
platform: | |
- linux/amd64 | |
# - linux/arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Free Disk Space | |
run: | | |
sudo rm -rf /usr/local/lib/android /opt/ghc | |
sudo docker image prune --all --force | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Show free space | |
run: | | |
echo "Free space:" | |
df -h | |
docker image ls | |
docker system df | |
- name: Build 4testing | |
id: build | |
run: | | |
echo ${REPO} | |
cd .${DOCKER_PATH} | |
if [ "${{ github.GITHUB_REF_NAME }}" = "develop" ]; then | |
PRODUCT_VERSION="develop" | |
DOCKER_TAG=${PRODUCT_VERSION}.${{ github.run_number }} | |
else | |
PRODUCT_VERSION=$(echo "${{ github.GITHUB_REF_NAME }}" | sed '/^release\b\|^hotfix\b\|^feature\b/s/release.*\/\|hotfix.*\/\|feature.*\///; s/-git-action$//; s/^v//') | |
DOCKER_TAG=${PRODUCT_VERSION}.${{github.run_number}} | |
fi | |
DOCKER_TAG=develop-test.${{ github.run_number }} | |
export DOCKER_TAG | |
docker buildx bake -f build.yml onlyoffice-api \ | |
--set *.args.GIT_BRANCH="develop" \ | |
--set *.args.PRODUCT_VERSION=${PRODUCT_VERSION} \ | |
--set *.args.BUILD_NUMBER=${BUILD_NUMBER} \ | |
--set *.platform=linux/amd64 | |
--push | |
echo "version=${DOCKER_TAG}" >> "$GITHUB_OUTPUT" | |
shell: bash | |
# docker buildx bake -f build.yml \ | |
# --set *.args.GIT_BRANCH=${{ github.GITHUB_REF_NAME }} \ | |
# --set *.args.PRODUCT_VERSION=${PRODUCT_VERSION} \ | |
# --set *.args.BUILD_NUMBER=${BUILD_NUMBER} \ | |
# --set *.platform=${{ matrix.platform }} \ | |
# --set *.platform=${{ matrix.platform }} \ | |
# --set *.args.PRODUCT_VERSION=${PRODUCT_VERSION} \ | |
# --set *.args.BUILD_NUMBER=${{github.run_number}} \ | |
# --push | |
# echo "version=${DOCKER_TAG}" >> "$GITH |