Merge pull request #8228 from 4teamwork/es/TI-1330-change-default #275
This file contains hidden or 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: Build Docker image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '*.*.*' | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Create src directory | |
| run: mkdir src | |
| - name: Checkout opengever.maintenance | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 4teamwork/opengever.maintenance | |
| path: src/opengever.maintenance | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: remote | |
| endpoint: tcp://buildkitd.buildx:1234 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set Git commit env variables | |
| run: | | |
| echo "GIT_TAG=$(git describe --tags --candidates=0)" >> $GITHUB_ENV | |
| echo "GIT_SHA_TAG=$(git describe --tags)" >> $GITHUB_ENV | |
| echo "LATEST_TAG=$(git describe --tags --abbrev=0 origin/master)" >> $GITHUB_ENV | |
| echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
| - name: Build and push ogcore | |
| uses: docker/bake-action@v6 | |
| env: | |
| GITLAB_DEPLOY_TOKEN: ${{ secrets.GITLAB_DEPLOY_TOKEN }} | |
| with: | |
| source: . | |
| files: docker-bake.hcl | |
| targets: ogcore | |
| push: true | |
| set: | | |
| *.secrets=id=gldt,env=GITLAB_DEPLOY_TOKEN | |
| - name: Build and push ogtestserver | |
| uses: docker/bake-action@v6 | |
| env: | |
| GITLAB_DEPLOY_TOKEN: ${{ secrets.GITLAB_DEPLOY_TOKEN }} | |
| with: | |
| source: . | |
| files: docker-bake.hcl | |
| targets: ogtestserver | |
| push: true | |
| set: | | |
| *.secrets=id=gldt,env=GITLAB_DEPLOY_TOKEN |