Skip to content

Commit

Permalink
cd: refactory cd (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiano-mallmann authored Aug 21, 2023
1 parent ce0da0b commit 6b104b4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 118 deletions.
54 changes: 0 additions & 54 deletions .github/data/docker-compose.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/data/magento2_module_install.sql

This file was deleted.

2 changes: 1 addition & 1 deletion .github/data/php8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG MARKETPLACE_REPO
ARG MARKETPLACE_NAME
ARG MARKETPLACE_VERSION
ARG MARKETPLACE_REPO_URL

RUN composer config minimum-stability dev
RUN composer config -g http-basic.repo.magento.com ${MAGENTO_KEY} ${MAGENTO_SECRET}
RUN composer require pagarme/pagarme-magento2-module:dev-stg

Expand Down
2 changes: 1 addition & 1 deletion .github/data/stg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG MARKETPLACE_REPO
ARG MARKETPLACE_NAME
ARG MARKETPLACE_VERSION
ARG MARKETPLACE_REPO_URL

RUN composer config minimum-stability dev
RUN composer config -g http-basic.repo.magento.com ${MAGENTO_KEY} ${MAGENTO_SECRET}
RUN composer require pagarme/pagarme-magento2-module:dev-stg

Expand Down
4 changes: 0 additions & 4 deletions .github/data/wait-for-mysql.sh

This file was deleted.

27 changes: 9 additions & 18 deletions .github/workflows/cd_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,7 @@ jobs:
-
name: Copy CI files to root
run: |
cp .github/data/docker-compose.yml .
cp .github/data/${{ matrix.tags }}/Dockerfile .
cp .github/data/wait-for-mysql.sh .
cp .github/data/magento2_module_install.sql .
-
name: Build image base for modifications
run: |
export MAGENTO_KEY=${{ secrets.MAGENTO_KEY }}
export MAGENTO_SECRET=${{ secrets.MAGENTO_SECRET }}
export MARKETPLACE_KEY=${{ secrets.MARKETPLACE_KEY }}
export MARKETPLACE_SECRET=${{ secrets.MARKETPLACE_SECRET }}
export MARKETPLACE_REPO=${{ secrets.MARKETPLACE_REPO }}
export MARKETPLACE_NAME=${{ secrets.MARKETPLACE_NAME }}
export MARKETPLACE_VERSION=${{ secrets.MARKETPLACE_VERSION }}
export MARKETPLACE_REPO_URL=${{ secrets.MARKETPLACE_REPO_URL }}
docker compose up -d
-
name: Activate and setup Plugin
run: docker ps
-
name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -57,6 +39,15 @@ jobs:
name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
build-args: |
MAGENTO_KEY=${{ secrets.MAGENTO_KEY }}
MAGENTO_SECRET=${{ secrets.MAGENTO_SECRET }}
MARKETPLACE_KEY=${{ secrets.MARKETPLACE_KEY }}
MARKETPLACE_SECRET=${{ secrets.MARKETPLACE_SECRET }}
MARKETPLACE_REPO=${{ secrets.MARKETPLACE_REPO }}
MARKETPLACE_NAME=${{ secrets.MARKETPLACE_NAME }}
MARKETPLACE_VERSION=${{ secrets.MARKETPLACE_VERSION }}
MARKETPLACE_REPO_URL=${{ secrets.MARKETPLACE_REPO_URL }}
context: .
push: true
tags: ${{ secrets.DOCKER_ACCOUNT }}/magento2-pagarme:${{ matrix.tags }}
Expand Down

0 comments on commit 6b104b4

Please sign in to comment.