-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
b601d51
commit c98295e
Showing
7 changed files
with
70 additions
and
13 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 |
---|---|---|
|
@@ -33,10 +33,18 @@ jobs: | |
script: | | ||
docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all | ||
- name: checkout | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Create main.cf and master.cf file' | ||
- name: Get Git Commit Hash | ||
id: git_info | ||
run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||
|
||
- name: Get Branch Name | ||
id: branch_name | ||
run: echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | ||
|
||
- name: Create main.cf and master.cf File | ||
run: | | ||
echo "${{ vars.POSTFIX_MAIN_CF }}" > main.cf | ||
echo "${{ vars.POSTFIX_MASTER_CF }}" > master.cf | ||
|
@@ -80,7 +88,7 @@ jobs: | |
source: "master.cf" | ||
target: /home/${{ vars.VM_USERNAME }}/postfix-config/ | ||
|
||
- name: SSH to VM and create .env.prod | ||
- name: SSH to VM and Create .env.prod | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ vars.VM_HOST }} | ||
|
@@ -138,6 +146,9 @@ jobs: | |
echo "SERVER_IMAGE_TAG=${{ inputs.server_image_tag }}" >> .env.prod | ||
echo "CLIENT_IMAGE_TAG=${{ inputs.client_image_tag }}" >> .env.prod | ||
echo "GIT_COMMIT=${{ env.GIT_COMMIT }}" >> .env.prod | ||
echo "GIT_BRANCH=${{ env.GIT_BRANCH }}" >> .env.prod | ||
- name: SSH to VM and Execute Docker-Compose Up | ||
uses: appleboy/[email protected] | ||
|
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
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