-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
109 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,16 @@ jobs: | |
# extract tag part of github.ref | ||
PUSHED_VERSION=$(cut -d'/' -f3 <<< "$GITHUB_REF") | ||
LATEST_RELEASED_VERSION=$(curl -s https://raw.githubusercontent.com/netz98/n98-magerun2/master/version.txt | tr -d '[:space:]') | ||
echo "pushed_version=$PUSHED_VERSION" >> $GITHUB_ENV | ||
echo "latest_released_version=$LATEST_RELEASED_VERSION" >> $GITHUB_ENV | ||
# Check if curl was successful | ||
if [[ -z "$LATEST_RELEASED_VERSION" ]]; then | ||
echo "Failed to fetch the latest released version." | ||
exit 1 | ||
fi | ||
echo "pushed_version=\"$PUSHED_VERSION\"" >> "$GITHUB_ENV" | ||
echo "latest_released_version=\"$LATEST_RELEASED_VERSION\"" >> "$GITHUB_ENV" | ||
- uses: jackbilestech/[email protected] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
|
@@ -91,13 +99,23 @@ jobs: | |
- name: rename phar file (tag) | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
# get tag part of github.ref | ||
# Get tag part of github.ref | ||
TAG=$(cut -d'/' -f3 <<< "$GITHUB_REF") | ||
LATEST_VERSION=$(curl -s https://raw.githubusercontent.com/netz98/n98-magerun2/master/version.txt | tr -d '[:space:]') | ||
cp n98-magerun2.phar n98-magerun2-${TAG}.phar | ||
cp n98-magerun2.phar.asc n98-magerun2-${TAG}.phar.asc | ||
mv n98-magerun2.phar n98-magerun2-latest.phar | ||
mv n98-magerun2.phar.asc n98-magerun2-latest.phar.asc | ||
LATEST_VERSION=$(curl -s https://raw.githubusercontent.com/netz98/n98-magerun2/master/version.txt | tr -d '[:space:]') | ||
# Check if curl was successful | ||
if [[ -z "$LATEST_VERSION" ]]; then | ||
echo "Failed to fetch the latest version." | ||
exit 1 | ||
fi | ||
# Rename files | ||
cp "n98-magerun2.phar" "n98-magerun2-${TAG}.phar" | ||
cp "n98-magerun2.phar.asc" "n98-magerun2-${TAG}.phar.asc" | ||
mv "n98-magerun2.phar" "n98-magerun2-latest.phar" | ||
mv "n98-magerun2.phar.asc" "n98-magerun2-latest.phar.asc" | ||
# List files to verify | ||
ls -l | ||
- name: Upload phar file to files.magerun.net | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,10 +52,20 @@ jobs: | |
|
||
- name: Install Mage-OS Nightly | ||
run: | | ||
composer create-project --stability alpha --repository-url=https://upstream-nightly.mage-os.org magento/project-community-edition mage-os; | ||
cd mage-os; | ||
# Define variables | ||
DB_PORT="${{ job.services.mysql.ports[3306] }}" | ||
ES_PORT="${{ job.services.elasticsearch.ports[9200] }}" | ||
DB_HOST="127.0.0.1:${DB_PORT}" | ||
# Create project | ||
composer create-project --stability alpha --repository-url=https://upstream-nightly.mage-os.org magento/project-community-edition mage-os | ||
# Change directory | ||
cd mage-os | ||
# Magento setup | ||
bin/magento setup:install \ | ||
--db-host="127.0.0.1:${{ job.services.mysql.ports[3306] }}" \ | ||
--db-host="$DB_HOST" \ | ||
--db-user=root \ | ||
--db-password=root \ | ||
--db-name=magento \ | ||
|
@@ -75,7 +85,7 @@ jobs: | |
--admin-email="[email protected]" \ | ||
--search-engine="elasticsearch7" \ | ||
--elasticsearch-host="127.0.0.1" \ | ||
--elasticsearch-port=${{ job.services.elasticsearch.ports[9200] }}; | ||
--elasticsearch-port="$ES_PORT" | ||
- name: Build phar file | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
|
||
yaml-files: | ||
- '*.yaml' | ||
- '*.yml' | ||
- '.yamllint' | ||
|
||
rules: | ||
anchors: enable | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: | ||
level: warning | ||
empty-lines: enable | ||
empty-values: disable | ||
float-values: disable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
line-length: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |