Skip to content

Code Nightly

Code Nightly #622

Workflow file for this run

name: Code Nightly
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
create-runner:
uses: gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@main
secrets:
runner_token: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_TOKEN }}
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
build:
runs-on: ${{ needs.create-runner.outputs.label }}
needs: [create-runner]
container:
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-go-122-gha.23879
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-environment
with:
sa_key: ${{ secrets.GCP_CREDENTIALS }}
leeway_segment_key: ${{ secrets.LEEWAY_SEGMENT_KEY }}
- id: build-code
name: Build
env:
PR_DESC: "${{ steps.pr-details.outputs.pr_body }}"
MAIN_BRANCH: ${{ (github.head_ref || github.ref) == 'refs/heads/main' }}
run: |
export LEEWAY_WORKSPACE_ROOT=$GITHUB_WORKSPACE
codeHeadCommit=$(curl -H 'Accept: application/vnd.github.VERSION.sha' https://api.github.com/repos/gitpod-io/openvscode-server/commits/gp-code/main)
codeVersion=$(curl https://raw.githubusercontent.com/gitpod-io/openvscode-server/$codeHeadCommit/package.json | jq .version)
cd components/ide/code
leeway build \
-Dversion=nightly \
-DimageRepoBase=eu.gcr.io/gitpod-core-dev/build \
-DcodeCommit=$codeHeadCommit \
-DcodeVersion=$codeVersion \
-DcodeQuality=insider \
.:docker
- name: Get previous job's status
id: lastrun
uses: filiptronicek/get-last-job-status@main
- name: Slack Notification
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_FOOTER: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow logs>"
delete-runner:
if: always()
needs:
- create-runner
- build
uses: gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@main
secrets:
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
with:
runner-label: ${{ needs.create-runner.outputs.label }}
machine-zone: ${{ needs.create-runner.outputs.machine-zone }}