Skip to content

Commit

Permalink
Merge branch 'main' into avoid-cache-issue-when-extracting-binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdavidburns committed Aug 26, 2024
2 parents b59c82f + 6ea2952 commit 2ab6db6
Show file tree
Hide file tree
Showing 57 changed files with 2,778 additions and 2,223 deletions.
51 changes: 36 additions & 15 deletions .github/workflows/DrainpipeDev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Push Drainpipe Dev Package
on:
push:
branches:
- main
- '**'
tags:
- 'v*'

Expand All @@ -16,43 +16,64 @@ permissions:

jobs:
Drainpipe-Dev:
name: Push branch to drainpipe-dev
name: Push to drainpipe-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Add drainpipe-dev deploy key in order to run git clone
- uses: ./scaffold/github/actions/common/setup-git
with:
git-name: Drainpipe Bot
git-email: [email protected]

- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }}
log-public-key: false

# Commits made by the https://github.com/apps/lullabot-drainpipe application.
# @see https://github.com/orgs/community/discussions/24664
- name: Create git checkout of drainpipe-dev
working-directory: drainpipe-dev
run: |
git init
git branch -m ${{ github.ref_name }}
git remote add origin [email protected]:Lullabot/drainpipe-dev.git
git fetch origin
git reset --mixed origin/${{ github.ref_name }} || git reset --mixed origin/main
git config user.name "Lullabot-Drainpipe[bot]"
git config user.email "157769597+Lullabot-Drainpipe[bot]@users.noreply.github.com"
- name: Push branch to drainpipe-dev
- name: Commit changes (Tag)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git reset --mixed origin/main
git add -A
git commit -m "$COMMIT_MESSAGE" --allow-empty
git push origin ${{ github.ref_name }}
env:
# Workaround if the commit message contains quotes.
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
git commit -m "${{ github.event.commits[0].message }}" --allow-empty
- name: Commit changes (Branch)
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git reset --mixed origin/${{ github.ref_name }} || git reset --mixed origin/main
git add -A
git commit -m "${{ github.event.commits[0].message }}" --allow-empty
- name: Push tag to drainpipe-dev
- name: Tag release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
working-directory: drainpipe-dev
run: |
git tag ${{ github.ref_name }}
- name: Push to drainpipe-dev
working-directory: drainpipe-dev
run: |
git push origin ${{ github.ref_name }}
- name: Create release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DRAINPIPE_DEV_RELEASE_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/lullabot/drainpipe-dev/releases \
-d '{"tag_name":"${{ github.ref_name }}","name":"${{ github.ref_name }}","body":"See <a href=\"https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}\">https://github.com/Lullabot/drainpipe/releases/tag/${{ github.ref_name }}</a>","draft":false,"prerelease":false,"generate_release_notes":false}'
42 changes: 42 additions & 0 deletions .github/workflows/DrainpipeDevClean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Clean Drainpipe Dev Package

on: delete

concurrency:
group: drainpipe-dev
cancel-in-progress: false

permissions:
contents: read

jobs:
Drainpipe-Dev-Clean:
name: Push branch to drainpipe-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./scaffold/github/actions/common/setup-git
with:
git-name: Drainpipe Bot
git-email: [email protected]

- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DRAINPIPE_DEV_DEPLOY_KEY }}
log-public-key: false

- name: Create git checkout of drainpipe-dev
working-directory: drainpipe-dev
run: |
git init
git branch -m ${{ github.event.ref }}
git remote add origin [email protected]:Lullabot/drainpipe-dev.git
git fetch origin
git reset --mixed origin/${{ github.event.ref }}
- name: Delete ref from drainpipe-dev
working-directory: drainpipe-dev
run: |
git push origin --delete ${{ github.event.ref }}
13 changes: 11 additions & 2 deletions .github/workflows/TestBinaryInstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ concurrency:
jobs:
Test-Binary-Installer:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: [ 8.1, 8.2, 8.3 ]
include:
- php-version: 8.1
drupal-version: ":^10"
- php-version: 8.2
drupal-version: ":^10"
steps:

- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -37,6 +45,7 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --php-version ${{ matrix.php-version }}
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand All @@ -52,7 +61,7 @@ jobs:
- name: Simulate failure
run: |
ddev exec touch /var/www/html/composer-cache/files/lullabot/drainpipe/bin/task/3.28.0/task_linux_amd64.tar
ddev exec touch /var/www/html/composer-cache/files/lullabot/drainpipe/bin/task/3.38.0/task_linux_amd64.tar
ddev composer install
- name: Test installing without composer cache
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/TestComposerLockDiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ concurrency:
jobs:
Test-Composer-Lock-Diff:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project:10.0.9 . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -77,7 +80,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: processed-descriptions
name: processed-descriptions-${{ matrix.drupal-version }}
path: |
renovate-processed.json
pr-template-processed.json
6 changes: 4 additions & 2 deletions .github/workflows/TestDDEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ concurrency:
jobs:
Test-DDEV-Install:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
run: composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs

- uses: actions/checkout@v4
with:
Expand All @@ -35,7 +38,6 @@ jobs:
- name: Setup Project
run: |
ddev config --auto
ddev config --nodejs-version "18"
ddev start
ddev composer config extra.drupal-scaffold.gitignore true
ddev composer config --json extra.drupal-scaffold.allowed-packages '["lullabot/drainpipe-dev", "lullabot/drainpipe"]'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/TestEnv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ concurrency:
jobs:
Test-Env:
runs-on: ubuntu-22.04
strategy:
matrix:
drupal-version: [ 10, 11 ]
steps:
- name: Create a Drupal project
run: |
composer create-project drupal/recommended-project . --ignore-platform-req=ext-gd
composer create-project drupal/recommended-project:^${{ matrix.drupal-version }} . --ignore-platform-reqs
- uses: actions/checkout@v4
with:
Expand Down
Loading

0 comments on commit 2ab6db6

Please sign in to comment.