Skip to content

Commit

Permalink
cd: fixing version variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateus Picoloto committed Dec 12, 2023
1 parent ddef8a1 commit 656420d
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 24 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/cd_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,34 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
wordpress_version_master: latest
woocommerce_version_master: latest
woocommerce_extra_checkout_fields_version_master: latest
wp_mail_catcher_version_master: latest
wordpress_version_master: ${{ vars.wordpress_version_master }}
woocommerce_version_master: ${{ vars.woocommerce_version_master }}
woocommerce_extra_checkout_fields_version_master: ${{ vars.woocommerce_extra_checkout_fields_version_master }}
wp_mail_catcher_version_master: ${{ vars.wp_mail_catcher_version_master }}
jobs:
generate-variables:
runs-on: ubuntu-latest
outputs:
wordpress_version_master: ${{ steps.main_step.outputs.wordpress_version_master }}
woocommerce_version_master: ${{ steps.main_step.outputs.woocommerce_version_master }}
woocommerce_extra_checkout_fields_version_master: ${{ steps.main_step.outputs.woocommerce_extra_checkout_fields_version_master }}
wp_mail_catcher_version_master: ${{ steps.main_step.outputs.wp_mail_catcher_version_master }}
steps:
- id: main_step
run: |
echo "wordpress_version_master=$wordpress_version_master" >> $GITHUB_OUTPUT
echo "woocommerce_version_master=$woocommerce_version_master" >> $GITHUB_OUTPUT
echo "woocommerce_extra_checkout_fields_version_master=$woocommerce_extra_checkout_fields_version_master" >> $GITHUB_OUTPUT
echo "wp_mail_catcher_version_master=$wp_mail_catcher_version_master" >> $GITHUB_OUTPUT
call-workflow-cd:
needs:
- generate-variables
uses: pagarme/woocommerce/.github/workflows/cd_reusable.yml@master
with:
tag: master
wordpress_image_version: ${{ env.wordpress_version_master }}
woocommerce_version: ${{ env.woocommerce_version_master }}
woocommerce_extra_checkout_fields_version: ${{ env.woocommerce_extra_checkout_fields_version_master }}
wp_mail_catcher_version: ${{ env.wp_mail_catcher_version_master }}
wordpress_image_version: ${{ needs.generate_variables.outputs.wordpress_version_master }}
woocommerce_version: ${{ needs.generate_variables.outputs.woocommerce_version_master }}
woocommerce_extra_checkout_fields_version: ${{ needs.generate_variables.outputs.woocommerce_extra_checkout_fields_version_master }}
wp_mail_catcher_version: ${{ needs.generate_variables.outputs.wp_mail_catcher_version_master }}
secrets:
inherit
32 changes: 24 additions & 8 deletions .github/workflows/cd_php8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,34 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
wordpress_version_php8: latest
woocommerce_version_php8: latest
woocommerce_extra_checkout_fields_version_php8: latest
wp_mail_catcher_version_php8: latest
wordpress_version_php8: ${{ vars.wordpress_version_php8 }}
woocommerce_version_php8: ${{ vars.woocommerce_version_php8 }}
woocommerce_extra_checkout_fields_version_php8: ${{ vars.woocommerce_extra_checkout_fields_version_php8 }}
wp_mail_catcher_version_php8: ${{ vars.wp_mail_catcher_version_php8 }}
jobs:
generate-variables:
runs-on: ubuntu-latest
outputs:
wordpress_version_php8: ${{ steps.main_step.outputs.wordpress_version_php8 }}
woocommerce_version_php8: ${{ steps.main_step.outputs.woocommerce_version_php8 }}
woocommerce_extra_checkout_fields_version_php8: ${{ steps.main_step.outputs.woocommerce_extra_checkout_fields_version_php8 }}
wp_mail_catcher_version_php8: ${{ steps.main_step.outputs.wp_mail_catcher_version_php8 }}
steps:
- id: main_step
run: |
echo "wordpress_version_php8=$wordpress_version_php8" >> $GITHUB_OUTPUT
echo "woocommerce_version_php8=$woocommerce_version_php8" >> $GITHUB_OUTPUT
echo "woocommerce_extra_checkout_fields_version_php8=$woocommerce_extra_checkout_fields_version_php8" >> $GITHUB_OUTPUT
echo "wp_mail_catcher_version_php8=$wp_mail_catcher_version_php8" >> $GITHUB_OUTPUT
call-workflow-cd:
needs:
- generate-variables
uses: pagarme/woocommerce/.github/workflows/cd_reusable.yml@develop
with:
tag: php8
wordpress_image_version: ${{ env.wordpress_version_php8 }}
woocommerce_version: ${{ env.woocommerce_version_php8 }}
woocommerce_extra_checkout_fields_version: ${{ env.woocommerce_extra_checkout_fields_version_php8 }}
wp_mail_catcher_version: ${{ env.wp_mail_catcher_version_php8 }}
wordpress_image_version: ${{ needs.generate_variables.outputs.wordpress_version_php8 }}
woocommerce_version: ${{ needs.generate_variables.outputs.woocommerce_version_php8 }}
woocommerce_extra_checkout_fields_version: ${{ needs.generate_variables.outputs.woocommerce_extra_checkout_fields_version_php8 }}
wp_mail_catcher_version: ${{ needs.generate_variables.outputs.wp_mail_catcher_version_php8 }}
secrets:
inherit
32 changes: 24 additions & 8 deletions .github/workflows/cd_stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,34 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
wordpress_version_stg: 5.2.0
woocommerce_version_stg: 4.3.0
woocommerce_extra_checkout_fields_version_stg: 3.4.0
wp_mail_catcher_version_stg: 2.0.0
wordpress_version_stg: ${{ vars.wordpress_version_stg }}
woocommerce_version_stg: ${{ vars.woocommerce_version_stg }}
woocommerce_extra_checkout_fields_version_stg: ${{ vars.woocommerce_extra_checkout_fields_version_stg }}
wp_mail_catcher_version_stg: ${{ vars.wp_mail_catcher_version_stg }}
jobs:
generate-variables:
runs-on: ubuntu-latest
outputs:
wordpress_version_stg: ${{ steps.main_step.outputs.wordpress_version_stg }}
woocommerce_version_stg: ${{ steps.main_step.outputs.woocommerce_version_stg }}
woocommerce_extra_checkout_fields_version_stg: ${{ steps.main_step.outputs.woocommerce_extra_checkout_fields_version_stg }}
wp_mail_catcher_version_stg: ${{ steps.main_step.outputs.wp_mail_catcher_version_stg }}
steps:
- id: main_step
run: |
echo "wordpress_version_stg=$wordpress_version_stg" >> $GITHUB_OUTPUT
echo "woocommerce_version_stg=$woocommerce_version_stg" >> $GITHUB_OUTPUT
echo "woocommerce_extra_checkout_fields_version_stg=$woocommerce_extra_checkout_fields_version_stg" >> $GITHUB_OUTPUT
echo "wp_mail_catcher_version_stg=$wp_mail_catcher_version_stg" >> $GITHUB_OUTPUT
call-workflow-cd:
needs:
- generate-variables
uses: pagarme/woocommerce/.github/workflows/cd_reusable.yml@develop
with:
tag: stg
wordpress_image_version: ${{ env.wordpress_version_stg }}
woocommerce_version: ${{ env.woocommerce_version_stg }}
woocommerce_extra_checkout_fields_version: ${{ env.woocommerce_extra_checkout_fields_version_stg }}
wp_mail_catcher_version: ${{ env.wp_mail_catcher_version_stg }}
wordpress_image_version: ${{ needs.generate_variables.outputs.wordpress_version_stg }}
woocommerce_version: ${{ needs.generate_variables.outputs.woocommerce_version_stg }}
woocommerce_extra_checkout_fields_version: ${{ needs.generate_variables.outputs.woocommerce_extra_checkout_fields_version_stg }}
wp_mail_catcher_version: ${{ needs.generate_variables.outputs.wp_mail_catcher_version_stg }}
secrets:
inherit

0 comments on commit 656420d

Please sign in to comment.