Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit d481d0f

Browse filesBrowse files
authored
packages (#445)
* packages
1 parent 43ec152 commit d481d0f
Copy full SHA for d481d0f

File tree

Expand file treeCollapse file tree

1 file changed

+34
-33
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+34
-33
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+34-33Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -188,52 +188,53 @@ jobs:
188188
path: /var/crash
189189

190190
publish:
191-
needs: [build]
192-
runs-on: ${{ matrix.operating-system }}
191+
if: github.repository == 'SkyAPM/SkyAPM-php-sdk'
192+
runs-on: ubuntu-latest
193+
permissions:
194+
contents: read
195+
packages: write
193196
strategy:
194197
matrix:
195-
operating-system: [ubuntu-latest]
196198
php-version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
197199
name: Publish PHP ${{ matrix.php-version }}
198200
steps:
199201
- name: Checkout
200202
uses: actions/checkout@v2
201203

204+
- name: Log in to Docker Hub
205+
uses: docker/login-action@v1
206+
with:
207+
username: ${{ secrets.DOCKER_USERNAME }}
208+
password: ${{ secrets.DOCKER_PASSWORD }}
209+
210+
- name: Log in to the Container registry
211+
uses: docker/login-action@v1
212+
with:
213+
registry: ghcr.io
214+
username: ${{ github.actor }}
215+
password: ${{ secrets.GITHUB_TOKEN }}
216+
217+
- name: Extract metadata for Docker
218+
id: meta
219+
uses: docker/metadata-action@v3
220+
with:
221+
images: |
222+
skyapm/skywalking-php
223+
ghcr.io/skyapm/skywalking-php
224+
202225
- name: Set output
203226
id: vars
204227
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
205228

206229
- name: Check output
207230
run: echo ${{ steps.vars.outputs.tag }}
208231

209-
- name: Publish Dokcer image
210-
if: github.repository == 'SkyAPM/SkyAPM-php-sdk' && github.event_name == 'push' && steps.vars.outputs.tag == 'master' && matrix.php-version == '8.0'
211-
uses: elgohr/Publish-Docker-Github-Action@3.04
232+
- name: Build and push
233+
uses: docker/build-push-action@v2
212234
with:
213-
name: skyapm/skywalking-php
214-
username: ${{ secrets.DOCKER_USERNAME }}
215-
password: ${{ secrets.DOCKER_PASSWORD }}
216-
dockerfile: docker/Dockerfile
217-
buildargs: PHP_VERSION=${{ matrix.php-version }}
218-
tags: "latest,master-${{ matrix.php-version }}-fpm-alpine"
219-
220-
- name: Publish Dokcer image
221-
if: github.repository == 'SkyAPM/SkyAPM-php-sdk' && github.event_name == 'push' && steps.vars.outputs.tag == 'master' && matrix.php-version != '8.0'
222-
uses: elgohr/Publish-Docker-Github-Action@3.04
223-
with:
224-
name: skyapm/skywalking-php
225-
username: ${{ secrets.DOCKER_USERNAME }}
226-
password: ${{ secrets.DOCKER_PASSWORD }}
227-
dockerfile: docker/Dockerfile
228-
buildargs: PHP_VERSION=${{ matrix.php-version }}
229-
tags: "master-${{ matrix.php-version }}-fpm-alpine"
230-
- name: Publish Dokcer image
231-
if: github.repository == 'SkyAPM/SkyAPM-php-sdk' && github.event_name == 'push' && steps.vars.outputs.tag != 'master' && startsWith(steps.vars.outputs.tag, 'v')
232-
uses: elgohr/Publish-Docker-Github-Action@3.04
233-
with:
234-
name: skyapm/skywalking-php
235-
username: ${{ secrets.DOCKER_USERNAME }}
236-
password: ${{ secrets.DOCKER_PASSWORD }}
237-
dockerfile: docker/Dockerfile
238-
buildargs: PHP_VERSION=${{ matrix.php-version }}
239-
tags: "${{steps.vars.outputs.tag}}-${{ matrix.php-version }}-fpm-alpine"
235+
context: .
236+
file: docker/Dockerfile
237+
build-args: PHP_VERSION=${{ matrix.php-version }}
238+
push: ${{ github.event_name != 'pull_request' }}
239+
tags: ${{ steps.vars.outputs.tag }}-${{ matrix.php-version }}-fpm-alpine
240+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.