Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cd: add env to version inputs #359

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading