cue/literal: use strings.Repeat directly #1433
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
# Code generated internal/ci/ci_tool.cue; DO NOT EDIT. | |
name: Release | |
"on": | |
push: | |
tags: | |
- v* | |
- '!*-0.dev' | |
branches: | |
- ci/test | |
- master | |
- release-branch.* | |
concurrency: release | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
if: ${{github.repository == 'cue-lang/cue'}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Reset git directory modification times | |
run: touch -t 202211302355 $(find * -type d) | |
- name: Restore git file modification times | |
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe | |
- id: DispatchTrailer | |
name: Try to extract Dispatch-Trailer | |
run: |- | |
x="$(git log -1 --pretty='%(trailers:key=Dispatch-Trailer,valueonly)')" | |
if [[ "$x" == "" ]] | |
then | |
# Some steps rely on the presence or otherwise of the Dispatch-Trailer. | |
# We know that we don't have a Dispatch-Trailer in this situation, | |
# hence we use the JSON value null in order to represent that state. | |
# This means that GitHub expressions can determine whether a Dispatch-Trailer | |
# is present or not by checking whether the fromJSON() result of the | |
# output from this step is the JSON value null or not. | |
x=null | |
fi | |
echo "value<<EOD" >> $GITHUB_OUTPUT | |
echo "$x" >> $GITHUB_OUTPUT | |
echo "EOD" >> $GITHUB_OUTPUT | |
- if: |- | |
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, ' | |
Dispatch-Trailer: {"type":"')))) && (contains(github.event.head_commit.message, ' | |
Dispatch-Trailer: {"type":"')) | |
name: Check we don't have Dispatch-Trailer on a protected branch | |
run: |- | |
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch" | |
false | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: false | |
go-version: 1.23.0 | |
- name: Setup qemu | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: cueckoo | |
password: ${{ secrets.CUECKOO_DOCKER_PAT }} | |
- name: Install CUE | |
run: go install ./cmd/cue | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
install-only: true | |
version: v2.2.0 | |
- name: Run GoReleaser with CUE | |
run: cue cmd release | |
working-directory: ./internal/ci/goreleaser | |
env: | |
GITHUB_TOKEN: ${{ secrets.CUECKOO_GITHUB_PAT }} | |
- if: startsWith(github.ref, 'refs/tags/v') | |
name: Re-test cuelang.org | |
run: 'curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail --request POST --data-binary "{\"event_type\":\"Re-test post release of ${GITHUB_REF##refs/tags/}\"}" https://api.github.com/repos/cue-lang/cuelang.org/dispatches' | |
- if: startsWith(github.ref, 'refs/tags/v') | |
name: Trigger unity build | |
run: 'curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.PORCUEPINE_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail --request POST --data-binary "{\"event_type\":\"Check against CUE ${GITHUB_REF##refs/tags/}\",\"client_payload\":{\"type\":\"unity\",\"payload\":{\"versions\":\"\\\"${GITHUB_REF##refs/tags/}\\\"\"}}}" https://api.github.com/repos/cue-unity/unity-private/dispatches' |