Skip to content

Commit

Permalink
Merge branch 'player-gh-actions-build' into 'main'
Browse files Browse the repository at this point in the history
[player] build .phar in gh-actions

See merge request platformsh/observability/blackfire/blackfire.io!36409
  • Loading branch information
julien-jean committed Nov 26, 2024
2 parents 98738f3 + f600020 commit e3eadc1
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,41 @@ on:
concurrency: canary

jobs:
phar:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, intl, uuid
tools: box:4.6.2
-
name: Build blackfire-player.phar
run: box compile -c box.json
-
name: Push blackfire-player.phar to S3
run: |
aws s3 cp blackfire-player.phar s3://get.blackfire.io/blackfire-player-latest.phar
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-west-1'
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Set COMPOSER_ROOT_VERSION environment variable
uses: "ergebnis/composer-root-version-action@main"
with:
branch: master

-
name: Docker meta
id: docker_meta
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/build_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,39 @@ on:
concurrency: prod

jobs:
phar:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Get version tag
id: git_tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, intl, uuid
tools: box:4.6.2
-
name: Build blackfire-player.phar
run: box compile -c box.json
-
name: Write player version in blackfire-player.version
run: echo ${{env.VERSION}} >> blackfire-player.version
-
name: Push blackfire-player.phar to S3
run: |
aws s3 cp blackfire-player.version s3://get.blackfire.io/blackfire-player.version
aws s3 cp blackfire-player.phar s3://get.blackfire.io/blackfire-player-${{ env.VERSION }}.phar
aws s3 cp blackfire-player.phar s3://get.blackfire.io/blackfire-player-latest.phar
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-west-1'
docker:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e3eadc1

Please sign in to comment.