-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add redeploy workflow using version.txt as tag version
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Redeploy version.txt tag to plone.org | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
meta: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
TAG: ${{ steps.vars.outputs.TAG }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Env Vars | ||
id: vars | ||
run: | | ||
echo "TAG=$(cat version.txt)" >> $GITHUB_OUTPUT | ||
deploy: | ||
if: github.event_name == 'workflow_dispatch' | ||
concurrency: deploy | ||
runs-on: ubuntu-latest | ||
needs: | ||
- meta | ||
environment: | ||
environment: | ||
name: plone.org | ||
url: https://plone.org | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Deploy to cluster | ||
uses: kitconcept/docker-stack-deploy@v1.2.0 | ||
with: | ||
registry: "ghcr.io" | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.DEPLOY_GHCR_READ_TOKEN }} | ||
remote_host: ${{ vars.DEPLOY_HOST }} | ||
remote_port: ${{ vars.DEPLOY_PORT }} | ||
remote_user: ${{ vars.DEPLOY_USER }} | ||
remote_private_key: ${{ secrets.DEPLOY_SSH }} | ||
stack_file: devops/stacks/plone.org.yml | ||
stack_name: plone-org | ||
stack_param: ${{ needs.meta.outputs.TAG }} | ||
env_file: ${{ secrets.ENV_FILE }} | ||
deploy_timeout: 480 |