# Promotes the release the canary is running right now, without waiting out # the judging window: the canary's signals must show no hard failure and no # relative breach, otherwise the run refuses and fails. Dispatch it with the # version the canary runs (`archied release canary status` shows it). name: promote on: workflow_dispatch: inputs: version: description: "release the canary is expected to run; must match what it runs" required: true type: string concurrency: group: promote cancel-in-progress: true permissions: contents: read packages: write jobs: promote: if: vars.CANARY_URL != '' runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v4 with: ref: main - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod # The self-hosted runner keeps the Go caches on disk between jobs, and # archiving them for the Actions cache takes minutes. cache: false - name: Build archied # The promote never serves the dashboard, so the build leaves it out. run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied # Promotion retags stable and the images' latest in the registry. - name: Log in to the Gitea registry run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin - name: Promote the canary's release env: ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }} run: | "$RUNNER_TEMP/archied" release canary promote -dashboard "${{ vars.CANARY_URL }}" \ -version "${{ inputs.version }}" \ -latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent