Skip to content

Commit

Permalink
GitHub workflow ps7 - fix release (#1291)
Browse files Browse the repository at this point in the history
* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7.x

* Deployment workflow PS 1.7

* Push zip files at GCP bucket storage root

* Fix draft release

* Fix draft release

* Fix release draft
  • Loading branch information
seiwan authored Dec 4, 2024
1 parent a9b0085 commit 2a8fa6a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
outputs:
integration: ${{ steps.zip-name.outputs.integration }}
preproduction: ${{ steps.zip-name.outputs.preproduction }}
production: ${{ github.event.repository.name }}
production: ${{ github.event.repository.name }}.zip

steps:
- name: Generate zip file name
id: zip-name
run: |
date=$(date -d '+2 hours' +'%Y-%m-%d_%H-%M-%S')
echo "$ENV=$REPOSITORY-$PS_VERSION-$ENV-$PR_NUMBER-$date" >> "$GITHUB_OUTPUT"
echo "$ENV=$REPOSITORY-$PS_VERSION-$ENV-$PR_NUMBER-$date.zip" >> "$GITHUB_OUTPUT"
env:
ENV: ${{ matrix.env }}
REPOSITORY: ${{ github.event.repository.name }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/push-to-bucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ on:

jobs:
bucket-zip-name:
name: Generate zip file name
name: Generate zip file name for GCP bucket
runs-on: ubuntu-latest
outputs:
integration: ${{ inputs.zip-name }}.zip
preproduction: ${{ inputs.zip-name }}.zip
production: ${{ steps.zip-name.outputs.name }}.zip
integration: ${{ inputs.zip-name }}
preproduction: ${{ inputs.zip-name }}
production: ${{ steps.zip-name.outputs.name }}

steps:
- name: Generate zip file name
id: zip-name
run: |
date=$(date -d '+2 hours' +'%Y-%m-%d_%H-%M-%S')
echo "name=$REPOSITORY-$PS_VERSION-$ENV-$PR_NUMBER-$date" >> "$GITHUB_OUTPUT"
echo "name=$REPOSITORY-$PS_VERSION-$ENV-$PR_NUMBER-$date.zip" >> "$GITHUB_OUTPUT"
env:
ENV: production
REPOSITORY: ${{ inputs.repository-name }}
PS_VERSION: ${{ inputs.prestashop-version }}
PR_NUMBER: pr${{ inputs.pr-number }}
PR_NUMBER: ${{ inputs.pr-number }}

push-to-bucket:
name: ${{ inputs.env-upper }} - Create zip file and push to GCP bucket storage
Expand All @@ -54,7 +54,7 @@ jobs:
environment: ${{ inputs.env-lower }}
permissions:
id-token: write
contents: read
contents: write
pull-requests: write
if: inputs.triggered == true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-to-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
environment: ${{ inputs.env-lower }}
permissions:
id-token: write
contents: read
contents: write
pull-requests: write
if: inputs.triggered == true

Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/update-release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
environment: ${{ inputs.env-lower }}
permissions:
id-token: write
contents: read
contents: write
pull-requests: write
if: inputs.triggered == true
env:
Expand All @@ -46,18 +46,6 @@ jobs:
cd ${{ inputs.repository-name }}
zip -r ../${{ env.ZIP_NAME }} . -x '*.DS_Store*' '*.git*' '*/.php_cs.*' '*__MACOSX*' '*/node_modules' '*/.npmrc' '*/composer.*' '*/package.*' '*/.editorconfig' '*_dev*' '*test*' '*/tests/*' '*/Test/*' '*/Tests/*' '*/gha-creds-*.json'
- name: Clean existing assets ♻️
shell: bash
run: |
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
assets=`bin/hub api -t repos/${{ inputs.repository-name }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'`
for asset in $assets
do
bin/hub api -X DELETE $asset
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to GitHub Release 🛩️
uses: actions/upload-release-asset@v1.0.2
env:
Expand Down

0 comments on commit 2a8fa6a

Please sign in to comment.