Drop php sdk in proper place. #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🚀 Deploy | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| actions: read | |
| contents: read | |
| id-token: write | |
| packages: write | |
| attestations: write | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: | |
| - master | |
| - next_release/* | |
| - release/* | |
| env: | |
| CONTAINER_NAME: ubiqube/msa2-php-sdk-installer | |
| REVIEWERS: msa-api | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: "${{ env.CONTAINER_NAME }}" | |
| tags: | | |
| type=sha,format=long | |
| latest | |
| - name: Build Docker image and publish to Docker Hub | |
| id: push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| provenance: mode=max | |
| sbom: true | |
| tags: "${{ steps.meta.outputs.tags }}" | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - name: Set latest commit message as env variable | |
| run: echo "LATEST_COMMIT_MESSAGE=$(git log -1 --oneline ${{ github.event.after }} | sed 's/"/\\"/g')" >> $GITHUB_ENV | |
| - name: Notify msa-docker repo about updated ${{ env.CONTAINER_NAME }} Docker image | |
| uses: benc-uk/workflow-dispatch@v1 | |
| with: | |
| token: ${{ secrets.MSA_DOCKER_REPO_ACCESS_TOKEN }} | |
| ref: ${{ github.ref_name || 'master' }} | |
| repo: ubiqube/msa-docker | |
| workflow: create-pr.yml | |
| inputs: |- | |
| { | |
| "image_name": "${{ env.CONTAINER_NAME }}", | |
| "image_tag": "sha-${{ github.sha }}", | |
| "latest_commit_message": "${{ env.LATEST_COMMIT_MESSAGE }}", | |
| "team_reviewers": "${{ env.REVIEWERS }}", | |
| "branch_name": "${{ github.ref_name }}" | |
| } |