43 lines
1.6 KiB
YAML
43 lines
1.6 KiB
YAML
name: Publish Yesod Mirror
|
|
on:
|
|
schedule:
|
|
- cron: '0 1 * * *' # Run at 1 AM
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
packages: write
|
|
|
|
jobs:
|
|
update-yesod-mirror:
|
|
runs-on: docker
|
|
container:
|
|
image: forgejo.csbx.dev/acmcarther/coder-dev-base-image:4
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install bazelisk
|
|
run: |
|
|
curl -fLO "http://bin-cache-http.dev.svc.cluster.local/bazelisk/v1.27.0/bazelisk-linux-amd64"
|
|
mkdir -p "${GITHUB_WORKSPACE}/bin/"
|
|
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
|
|
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
|
|
echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global user.name "Copybara"
|
|
git config --global user.email "copybara@csbx.dev"
|
|
git config --global url."https://acmcarther:${{ secrets.YESOD_MIRROR_TOKEN }}@forgejo.csbx.dev/acmcarther/yesod-mirror.git".insteadOf "https://forgejo.csbx.dev/acmcarther/yesod-mirror.git"
|
|
git config --global url."https://acmcarther:${{ secrets.YESOD_MIRROR_TOKEN }}@forgejo.csbx.dev/acmcarther/yesod.git".insteadOf "https://forgejo.csbx.dev/acmcarther/yesod.git"
|
|
|
|
- name: Run Copybara
|
|
env:
|
|
BAZELISK_BASE_URL: "http://bin-cache-http.dev.svc.cluster.local/bazel"
|
|
run: |
|
|
# Run Copybara
|
|
bazel run //tools/copybara:copybara --config=remote --java_runtime_version=remotejdk_21 -- \
|
|
migrate \
|
|
"${GITHUB_WORKSPACE}/tools/copybara/yesod-mirror/copy.bara.sky" \
|
|
--force
|