Skip to content

Commit

Permalink
Merge pull request #167 from pagarme/stg
Browse files Browse the repository at this point in the history
Stg
  • Loading branch information
mauriciohaygert authored Mar 28, 2023
2 parents 05a4e03 + c7d5974 commit 0ab4014
Show file tree
Hide file tree
Showing 19 changed files with 3,115 additions and 260 deletions.
240 changes: 0 additions & 240 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
55 changes: 35 additions & 20 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CD
on:
push:
branches:
- 'master'
- 'develop'
- 'test'
- 'stg'
- develop
- test
- stg
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,38 +16,53 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
container:
image: docker:rc-git
steps:
-
name: Checkout Code
uses: actions/checkout@v3
-
name: Copy CI files to root
run: |
cd /app
cp Devops/auth.json .
cp Devops/docker-compose.yml .
cp Devops/Dockerfile .
cp Devops/wait-for-mysql.sh .
cp Devops/magento2_module_install.sql .
cp .github/data/auth.json .
cp .github/data/docker-compose.yml .
cp .github/data/Dockerfile .
cp .github/data/wait-for-mysql.sh .
cp .github/data/magento2_module_install.sql .
-
name: Build image base for modifications
run: |
cd /app
ls
docker compose up -d
-
name: Activate and setup Plugin
run: docker ps
-
name: Commit and push Docker image
run: |
sleep 5 && docker stop magento2_bitnami
docker login ${{ secrets.DOCKER_ACCOUNT }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker commit magento2_bitnami "${{ secrets.DOCKER_ACCOUNT }}/${{ github.repository }}:${{ github.ref }}"
docker push "${{ secrets.DOCKER_ACCOUNT }}/${{ github.repository }}:${{ github.ref }}"
-
name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: mpdockerregistry.azurecr.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: mpdockerregistry.azurecr.io/magento2-pagarme
-
name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# name: Commit and push Docker image
# run: |
# sleep 5 && docker stop magento2_bitnami
# docker login ${{ secrets.DOCKER_ACCOUNT }} -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
# docker commit magento2_bitnami "magento2-pagarme:${{ github.ref_name }}"
# docker push "magento2-pagarme:${{ github.ref_name }}"
# name: Send deployment webhook to Rancher
# run: |
# BODY='{"push_data":{"tag":"'"${{ github.ref }}"'"},"repository":{"repo_name":"'"${{ secrets.DOCKER_ACCOUNT }}/${{ github.repository }}"'"}}'
Expand Down
Loading

0 comments on commit 0ab4014

Please sign in to comment.