Skip to content

Commit

Permalink
Resolving some syntax errors with zip.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb authored Sep 6, 2024
1 parent cf889fc commit 0644e80
Showing 1 changed file with 3 additions and 46 deletions.
49 changes: 3 additions & 46 deletions .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Set up authentication for NODE_AUTH_TOKEN if present
if: secrets.NODE_AUTH_TOKEN
run: echo "//npm.pkg.github.com/:_authToken=\${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- name: pup build with composer auth
if: steps.s3_zip_exists.outcome != 'success' && env.COMPOSER_TOKEN_AVAILABLE == 'true'
if: steps.s3_zip_exists.outcome != 'success' && env.COMPOSER_TOKEN_AVAILABLE == "true"
env:
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_TOKEN }}"}}'
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
Expand All @@ -220,47 +220,4 @@ jobs:
run: composer -- pup i18n

- name: pup package
id: pup_package
if: steps.s3_zip_exists.outcome != 'success'
run: composer -- pup package ${{ env.VERSION }}

- name: Create the zip_files folder
if: steps.s3_zip_exists.outcome != 'success'
run: |
mkdir zip_files
cp ${{ env.ZIP_NAME }}.zip zip_files
# ------------------------------------------------------------------------------
# Store zip on s3 service.
# ------------------------------------------------------------------------------
- name: Upload the zip to Wasabi
if: steps.s3_zip_exists.outcome != 'success'
uses: the-events-calendar/action-s3-utility@main
with:
args: --acl public-read --follow-symlinks
env:
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
S3_REGION: ${{ secrets.S3_REGION }}
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
COMMAND: sync
SOURCE_DIR: zip_files

# ------------------------------------------------------------------------------
# Send slack message.
# ------------------------------------------------------------------------------
- name: Trigger Slack message
if: inputs.slack_channel && inputs.slack_thread
run: |
curl -X GET "https://utility.theeventscalendar.com/slack-message.php?channel=${{ inputs.slack_channel }}&thread=${{ inputs.slack_thread }}&file=${{ env.ZIP_NAME }}.zip&secret=${{ secrets.JENKINS_SECRET }}&url=https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
# ------------------------------------------------------------------------------
# Upload the artifact if it is a workflow dispatch.
# ------------------------------------------------------------------------------
- name: Upload plugin artifact
if: steps.pup_package.outcome == 'success' && github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v3
with:
name: ${{ env.ZIP_NAME }}
path: .pup-zip
id

0 comments on commit 0644e80

Please sign in to comment.