Skip to content

Commit

Permalink
Merge pull request #101 from UN-OCHA/cafuego/actions-updates
Browse files Browse the repository at this point in the history
The updater now auto-detects PHP versions
  • Loading branch information
berliner authored Jun 16, 2023
2 parents f4416ca + 92c30d5 commit 6856233
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/composer-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ jobs:
id: update-action
uses: UN-OCHA/actions/composer-update@main
with:
php_version: 8.1
github_access_token: ${{ secrets.PAT }}
patch_branch: 'develop'
patch_packages: 'drupal/*'
patch_maintainers: ${{ secrets.DRUPAL_MAINTAINERS }}
patch_maintainers: ${{ vars.DRUPAL_MAINTAINERS }}
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_name: ${{ secrets.SLACK_CHANNEL }}
flowdock_token: ${{ secrets.FLOWDOCK_TOKEN }}
slack_channel_name: ${{ vars.SLACK_CHANNEL }}
4 changes: 1 addition & 3 deletions .github/workflows/docker-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,5 @@ jobs:
docker_password: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
ecr_github_token: ${{ secrets.ECR_GITHUB_TOKEN }}
ecr_jenkins_token: ${{ secrets.JENKINS_ECR_TOKEN }}
flowdock_token: ${{ secrets.FLOWDOCK_TOKEN }}
flowdock_icon_failure: 'custard'
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_name: ${{ secrets.SLACK_CHANNEL }}
slack_channel_name: ${{ vars.SLACK_CHANNEL }}
25 changes: 16 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
id: checkout
uses: actions/checkout@v3

- name: Extract PHP Version
id: php
uses: docker://ghcr.io/un-ocha/actions:extract-php-version-main
with:
docker_file: 'docker/Dockerfile'
docker_image: 'public.ecr.aws/unocha/php-k8s'

- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: ${{ steps.php.outputs.php_version }}
tools: composer
env:
fail-fast: true
Expand All @@ -22,10 +33,6 @@ jobs:
run: |
php --version && composer --version
- name: Checkout Code
id: checkout
uses: actions/checkout@v3

- name: Composer Validate
id: validate
uses: cafuego/command-output@main
Expand All @@ -47,7 +54,7 @@ jobs:

- name: Configure AWS Credentials
id: aws
uses: aws-actions/configure-aws-credentials@v1-node16
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -188,7 +195,7 @@ jobs:
if: success()
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: '${{ secrets.SLACK_CHANNEL }}'
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
{
"text": "Tests passed for a pull request on ${{ github.repository }}",
Expand All @@ -215,7 +222,7 @@ jobs:
if: failure()
uses: slackapi/slack-github-action@v1.23.0
with:
channel-id: '${{ secrets.SLACK_CHANNEL }}'
channel-id: '${{ vars.SLACK_CHANNEL }}'
payload: |
{
"text": "Tests failed for a pull request on ${{ github.repository }}",
Expand All @@ -235,4 +242,4 @@ jobs:
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit 6856233

Please sign in to comment.