Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. This link creates a file in the .github/worflows/ folder. Use the standard naming github-ci.yml and add the below content to the file.

...

Code Block
name: Deploy
 
on:
  push:
    branches: 
      - main
  env:   URL: "https://qa.pricefx.com"
  PARTITION: "sandbox-qa"
 - qa

jobs:
  deploy:
    nameruns-on: Deployubuntu-latest
    runs-on: ubuntu-latestcontainer: pricefx/pfxpackage

    steps:
      - name: Checkout code Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
        uses: actions/checkout@v2
checkout@v4

      - name: Deploy with pfxpackage PROD - Deploys your logic and other artifacts to the partition using pfxpackage docker image
        #envif: github.ref == 'refs/heads/main'
        #PFX_USER: should be set as masked variable in project's settings on Github -> Settings -> CI/CD -> Variable [TODO: modify this as per Github @udayvala]env:
          URL: 'https://customer.pricefx.com'
          PARTITION: 'customer'
          PFX_USER: ${{ vars.PFX_USER }}
          PFX_PASS:  #PFX_PASS: the same applies to PFX_PASS do not ever put it here${{ secrets.PFX_PASS }}
        run: pfxpackage -import -timeout 120 
          -url $URL -user $PFX_USER -password $PFX_PASS -partition $PARTITION 
          -from $GITHUB_WORKSPACE $OPTIONS

      - run:
          docker run --rm -v $(pwd):$(pwd) -w $(pwd) pricefx/pfxpackagename: QA - Deploys your logic and other artifacts to the partition using pfxpackage docker image
        if: github.ref == 'refs/heads/qa'
        env:
          URL: 'https://customer-qa.pricefx.com'
          PARTITION: 'customer-qa'
          PFX_USER: ${{ vars.PFX_USER }}
          PFX_PASS: ${{ secrets.PFX_PASS }}
        run: pfxpackage -import -timeout 120 
          -url $URL -user $PFX_USER -password $PFX_PASS -partition $PARTITION 
          -from .$GITHUB_WORKSPACE $OPTIONS

  1. Navigate to Actions > All workflows and you should be able to see the list of workflows and the corresponding workflow runs.

...

GitHub Actions will always download the latest pricefx/pfxpackage docker image from the registry

...