Skip to content

Commit

Permalink
[TASK] Fix github actions for TYPO3 13 (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
kszymukowicz authored Sep 29, 2024
1 parent b3dc634 commit 9ca9dfe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
10 changes: 3 additions & 7 deletions .ddev/commands/host/ci
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ ci_single() {
ddev config --php-version="$PHP"
ddev restart

if [ -z "$GH_TOKEN" ] && ! ddev composer config --global --list | grep -q "github-oauth.github.com"; then
message red 'Be sure we have some github token. Add it to your ~/.ddev/homeadditions/.composer/auth.json or make available as GH_TOKEN'
exit 1
fi
if ! ddev composer config --global --list | grep -q "github-oauth.github.com"; then
message magenta "Add GH_TOKEN to composer github-oauth.github.com"
ddev composer config --global github-oauth.github.com ${GH_TOKEN}
if [ -n "$GH_TOKEN" ] && ! ddev composer config --global --list | grep -q "github-oauth.github.com"; then
message magenta "Add GH_TOKEN to composer github-oauth.github.com after 'ddev ci' internal ddev restart"
ddev composer config --global github-oauth.github.com "${GH_TOKEN}"
fi

stashComposerFiles
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/TYPO3_12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ jobs:
php: ["8.1", "8.2", "8.3"]
composer: ["lowest", "highest"]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Check Gitlab Token
run: |
if [ -z "${{ env.GH_TOKEN }}" ]; then
echo "GH_TOKEN is not set in Action Secrets"
exit 1
fi
- name: Run tests
uses: ddev/github-action-setup-ddev@v1
- run: ddev composer config --global github-oauth.github.com ${{ env.GH_TOKEN }}
- run: |
if [ -n "$GH_TOKEN" ] && ! ddev composer config --global --list | grep -q "github-oauth.github.com"; then
echo "Add composer github-oauth.github.com to ddev web container."
ddev composer config --global github-oauth.github.com ${{ env.GH_TOKEN }}
fi
- run: ddev ci ${{ matrix.typo3 }} ${{ matrix.php }} ${{ matrix.composer }}

14 changes: 6 additions & 8 deletions .github/workflows/TYPO3_13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ jobs:
php: ["8.2", "8.3"]
composer: ["lowest", "highest"]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Check Gitlab Token
run: |
if [ -z "${{ env.GH_TOKEN }}" ]; then
echo "GH_TOKEN is not set in Action Secrets"
exit 1
fi
- name: Run tests
uses: ddev/github-action-setup-ddev@v1
- run: ddev composer config --global github-oauth.github.com ${{ env.GH_TOKEN }}
- run: |
if [ -n "$GH_TOKEN" ] && ! ddev composer config --global --list | grep -q "github-oauth.github.com"; then
echo "Add composer github-oauth.github.com to ddev web container."
ddev composer config --global github-oauth.github.com ${{ env.GH_TOKEN }}
fi
- run: ddev ci ${{ matrix.typo3 }} ${{ matrix.php }} ${{ matrix.composer }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
/var/
/.php_cs.cache
/.php-cs-fixer.cache
/composer.json.orig

0 comments on commit 9ca9dfe

Please sign in to comment.