v1.2.0 #30
Workflow file for this run
This file contains 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: π Push | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
push_to_docker_hub: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
strategy: | |
matrix: | |
php_versions: | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
steps: | |
- name: π» Check out current project revision | |
uses: actions/checkout@v4 | |
- name: π Configure AWS service account credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-1 | |
aws-access-key-id: ${{ vars.aws_access_key_id }} | |
aws-secret-access-key: ${{ secrets.aws_secret_access_key }} | |
- name: π§βπ» Login to Amazon ECR Public | |
id: login-ecr-public | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
mask-password: 'true' | |
registry-type: public | |
- name: π Build Docker image | |
run: >- | |
docker build | |
--tag public.ecr.aws/gbh-tech/lep:${{ matrix.php_versions }} | |
--build-arg PHP_VERSION=${{ matrix.php_versions }} | |
--platform linux/amd64 . | |
- name: π« Push image to Amazon ECR | |
run: docker push public.ecr.aws/gbh-tech/lep:${{ matrix.php_versions }} | |