-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (42 loc) · 1.29 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 🚀 push
on:
workflow_dispatch:
push:
tags:
- 20[2-9][0-9][0-1][0-9][0-3][0-9]-[0-9][0-9]
pull_request:
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 .
-t public.ecr.aws/f1n0z7a8/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/f1n0z7a8/lep:${{ matrix.php_versions }}