Skip to content

Commit

Permalink
Merge pull request #368 from PrestaShop/forcePublish
Browse files Browse the repository at this point in the history
Github Action Publish : Rework (Base & Fetch versions before push images)
  • Loading branch information
Progi1984 authored Jan 26, 2024
2 parents 1eefe7f + 57e133b commit a2d732f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,24 @@ on:
- master

jobs:
get_versions:
name: Get PrestaShop versions to build
publish_base:
runs-on: ubuntu-latest
steps:
# Fetch versions to work for images
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- id: set-versions
run: echo "::set-output name=versions::$(./get_json_versions.py)"
outputs:
versions: ${{ steps.set-versions.outputs.versions }}

publish_base:
runs-on: ubuntu-latest
needs: get_versions
steps:
# Push image base
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: actions/checkout@v2

## Check if there are modifications in the base/ directory
## and store it in the variable `steps.changes.outputs.base`
## The variable is built like: steps.{#id}.outputs.{#filter}
Expand Down Expand Up @@ -61,6 +53,8 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && steps.changes.outputs.base == 'true' }}
run: ./docker_tags.sh -p -f
working-directory: base
outputs:
versions: ${{ steps.set-versions.outputs.versions }}

publish_images:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions base/images/7.1-fpm/config_files/ps-extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if [[ -n "$folder" ]]; then
fi

chown www-data:www-data -R $folder/prestashop/
# Copy all files (included .env files)
cp -n -R -T -p $folder/prestashop/ /var/www/html
else
echo "Missing folder to move"
Expand Down

0 comments on commit a2d732f

Please sign in to comment.