ci(docker): Updating syntax for dockerfile #2048
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 | |
| permissions: | |
| actions: none | |
| checks: none | |
| contents: read | |
| deployments: none | |
| issues: none | |
| packages: none | |
| pages: none | |
| pull-requests: none | |
| repository-projects: none | |
| security-events: none | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| SCRIPTS_NO_INTERACTIVE: 'true' | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '25' | |
| - run: | | |
| npm install --ignore-scripts --global npm@8 | |
| - name: Build | |
| run: | | |
| make | |
| git --no-pager diff && git diff --quiet | |
| - name: Setup Docker | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Docker | |
| if: env.SCW_SECRET_KEY | |
| env: | |
| DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} | |
| DOCKER_NAMESPACE: ${{ vars.DOCKER_NAMESPACE }} | |
| SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} | |
| DOCKER_ARCHS: linux/amd64 linux/arm64 | |
| run: | | |
| curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap.sh" | bash -s -- "-c" "release.sh" | |
| docker login "${DOCKER_REGISTRY}/${DOCKER_NAMESPACE}" -u nologin --password-stdin <<< "${SCW_SECRET_KEY}" | |
| DOCKER_IMAGE="${DOCKER_REGISTRY}/${DOCKER_NAMESPACE}/$(make name)" IMAGE_VERSION="$(make version)" GIT_SHA="$(make version-full)" ./scripts/release.sh docker | |
| publish: | |
| name: Publish | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Publish | |
| if: env.SCW_SECRET_KEY | |
| env: | |
| DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} | |
| DOCKER_NAMESPACE: ${{ vars.DOCKER_NAMESPACE }} | |
| SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }} | |
| SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} | |
| run: | | |
| curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap.sh" | bash -s -- "-c" "docker_promote.sh" | |
| docker login "${DOCKER_REGISTRY}/${DOCKER_NAMESPACE}" -u nologin --password-stdin <<< "${SCW_SECRET_KEY}" | |
| scripts/docker_promote.sh -d "$(make version-date)" "${DOCKER_NAMESPACE}/$(make name)" "$(make version)" | |
| - name: Flux | |
| if: env.FLUX_WEBHOOK_URL | |
| env: | |
| FLUX_TOKEN: ${{ secrets.FLUX_TOKEN }} | |
| FLUX_WEBHOOK_URL: ${{ secrets.FLUX_WEBHOOK_URL }} | |
| run: | | |
| curl --disable --silent --show-error --location --max-time 30 --header "X-Signature: sha256=$(printf "{}" | openssl dgst -sha256 -r -hmac "${FLUX_TOKEN}"| awk '{print $1}')" --data "{}" "${FLUX_WEBHOOK_URL}" |