...
Code Block |
---|
name: Deploy on: push: branches: - main - qa workflow_dispatch: # enable manual runs, useful for dev and uat env: PFX_USER: ${{ vars.PFX_USER }} PFX_PASS: ${{ secrets.PFX_PASS }} jobs: deploytest: runs-on: ubuntu-latest container: maven: pricefx/pfxpackage3.6-jdk-11 steps: - name: Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it Checkout repository uses: actions/checkout@v4 - name: Cache local Maven repository uses: actions/checkout@v4cache@v4 - namewith: PROD - Deploys your logic and other artifacts to the partition using pfxpackage docker imagepath: /root/.m2/repository ifkey: ${{ githubrunner.ref == 'refs/heads/main'os }}-maven-${{ hashFiles('**/pom.xml') }} envrestore-keys: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} URL: 'https://customer.pricefx.com' - PARTITIONname: 'customer'test run: mvn pfxpackageclean test -importe --batch-timeoutmode 120 deploy: runs-on: ubuntu-latest -url $URL -user $PFX_USER -password $PFX_PASS -partition $PARTITION container: pricefx/pfxpackage needs: test # only deploy if test results are green -from $GITHUB_WORKSPACE $OPTIONS steps: - name: QA - Deploys your logic and other artifacts to the partition using pfxpackage docker image Checkout repository uses: actions/checkout@v4 - name: deploy PROD customer if: github.ref == 'refs/heads/qamain' env:run: pfxpackage -import -timeout 120 URL:-url 'https://customer-qa.pricefx.com' -partition customer -user $PFX_USER -password $PFX_PASS -from $GITHUB_WORKSPACE $OPTIONS - PARTITIONname: deploy QA 'customer-qa if: github.ref == 'refs/heads/qa' run: pfxpackage -import -timeout 120 -url $URL https://customer-qa.pricefx.com -partition customer-qa -user $PFX_USER -password $PFX_PASS -partition $PARTITION -from $GITHUB_WORKSPACE $OPTIONS |
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
...
Info |
---|
Pro tip: Studio plugin for IntelliJ Idea can generate the |