Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Action Publish : Rework (Base & Fetch versions before push images) #368

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading