diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ad418f3..34ee1966 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,10 +50,24 @@ on: default: false jobs: - debug-inputs: - name: Debug inputs - runs-on: blacksmith-2vcpu-ubuntu-2404 + buildid: + name: Generate build ID + runs-on: ubuntu-latest + outputs: + buildids: ${{ steps.get.outputs.bid }} steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + token: ${{ secrets.DEPLOY_KEY }} + + - id: get + shell: bash -xe {0} + run: | + bdat=`date +"%Y%m%d%I%M%S"` + echo "bid=${bdat}" >> $GITHUB_OUTPUT + - name: Debug run: | echo "create_release: ${{ inputs.create_release }}" @@ -64,21 +78,28 @@ jobs: echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}" echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}" - buildid: - name: Generate build ID - runs-on: blacksmith-2vcpu-ubuntu-2404 - outputs: - buildids: ${{ steps.get.outputs.bid }} - steps: - - id: get - shell: bash -xe {0} + - name: Check if correct branch + if: ${{ inputs.create_release }} run: | - bdat=`date +"%Y%m%d%I%M%S"` - echo "bid=${bdat}" >> $GITHUB_OUTPUT + echo "Checking if we are on the correct branch" + git branch + git status + git branch --show-current + branch="${{ inputs.update_branch }}" + if [[ $branch == "twilight" ]]; then + branch="dev" + elif [[ $branch == "release" ]]; then + branch="stable" + fi + if [[ $(git branch --show-current) != $branch ]]; then + echo ">>> Branch mismatch" + # exit 1 + else + echo ">>> Branch matches" + fi start-self-host: - runs-on: blacksmith-2vcpu-ubuntu-2404 - needs: debug-inputs + runs-on: ubuntu-latest steps: - name: Download aws-cli if: ${{ inputs.create_release && inputs.update_branch == 'release' }} @@ -101,42 +122,12 @@ jobs: echo "Removing self-hosted runner script" rm start.sh || true - check-build-is-correct: - runs-on: blacksmith-2vcpu-ubuntu-2404 - needs: [debug-inputs] - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - token: ${{ secrets.DEPLOY_KEY }} - - - name: Check if correct branch - if: ${{ inputs.create_release }} - run: | - echo "Checking if we are on the correct branch" - git branch - git status - git branch --show-current - branch="${{ inputs.update_branch }}" - if [[ $branch == "twilight" ]]; then - branch="dev" - elif [[ $branch == "release" ]]; then - branch="stable" - fi - if [[ $(git branch --show-current) != $branch ]]; then - echo ">>> Branch mismatch" - # exit 1 - else - echo ">>> Branch matches" - fi - build-data: permissions: contents: write name: Generate build data runs-on: blacksmith-2vcpu-ubuntu-2404 - needs: check-build-is-correct + needs: buildid outputs: build_date: ${{ steps.data.outputs.builddate }} version: ${{ steps.data.outputs.version }} diff --git a/.github/workflows/code-linter.yml b/.github/workflows/code-linter.yml index dd7e1c63..817a03c7 100644 --- a/.github/workflows/code-linter.yml +++ b/.github/workflows/code-linter.yml @@ -4,7 +4,6 @@ on: push: branches: - dev - workflow_dispatch: workflow_call: pull_request: branches: @@ -16,6 +15,7 @@ permissions: jobs: lint: runs-on: ubuntu-latest + if: ${{ !contains(github.event.head_commit.message, '[no-lint]') }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 099f8e2a..92787667 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -44,10 +44,6 @@ jobs: with: tool-cache: false - # Bug: https://github.com/actions/checkout/issues/1153 - - name: Remove zombie lock file - run: rm -f /home/ubuntu/actions-runner/_work/desktop/desktop/.git/modules/l10n/index.lock - - name: Checkout repository uses: actions/checkout@v4 with: diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 843fbdd6..6cea2529 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -53,10 +53,6 @@ jobs: with: tool-cache: false - # Bug: https://github.com/actions/checkout/issues/1153 - - name: Remove zombie lock file - run: rm -f /home/ubuntu/actions-runner/_work/desktop/desktop/.git/modules/l10n/index.lock - - name: Checkout repository uses: actions/checkout@v4 with: