Merge remote-tracking branch 'upstream/r/18.x' into shio/18 #26
Workflow file for this run
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: main | |
| on: | |
| push: | |
| branches: | |
| - shio/* | |
| tags: | |
| - '*_shio.*' | |
| pull_request: | |
| branches: | |
| - shio/* | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| OCI_REGISTRY: rg.nl-ams.scw.cloud/shio-solutions | |
| OCI_REPO: tales-media/fork/opencast-editor | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/login-action@v3 | |
| if: ${{ github.event_name == 'push' }} | |
| with: | |
| registry: ${{ env.OCI_REGISTRY }} | |
| username: nologin | |
| password: ${{ secrets.SCW_SECRET_KEY }} | |
| - name: info | |
| run: | | |
| docker version | |
| docker info | |
| - name: set tag version | |
| if: ${{ github.ref_type == 'tag' }} | |
| run: | | |
| echo "${{ github.ref_name }}" > VERSION | |
| - name: build | |
| run: | | |
| docker build --pull --no-cache \ | |
| --build-arg VERSION="$(cat VERSION)" \ | |
| --build-arg BUILD_DATE="$(date -u -Iseconds)" \ | |
| --build-arg GIT_COMMIT="${{ github.sha }}" \ | |
| -t "${OCI_REGISTRY}/${OCI_REPO}:latest" \ | |
| -t "${OCI_REGISTRY}/${OCI_REPO}:${{ github.sha }}" \ | |
| -t "${OCI_REGISTRY}/${OCI_REPO}:$(cat VERSION)" \ | |
| . | |
| - name: push | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| docker push "${OCI_REGISTRY}/${OCI_REPO}:$(cat VERSION)" | |
| - name: push latest | |
| if: ${{ github.event_name == 'push' && github.ref_type == 'branch' }} | |
| run: | | |
| docker push "${OCI_REGISTRY}/${OCI_REPO}:latest" |