Test secrets #25
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
name: Deploy to test | |
on: | |
workflow_run: | |
workflows: [CI] | |
types: [completed] | |
run-name: ${{ github.event.workflow_run.head_commit.message }} | |
jobs: | |
deploy-test: | |
name: Deploy to test | |
runs-on: ubuntu-latest | |
environment: test | |
permissions: | |
contents: write | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: workflow name | |
run: | | |
echo "${{ github.event.workflow.name }}" | |
- name: head_commit messsage | |
run: | | |
echo "${{ github.event.workflow_run.head_commit.message }}" | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- name: Print environment specific variable | |
run: | | |
echo "EXAMPLE_VARIABLE: ${{ vars.EXAMPLE_VARIABLE}}" | |
# Workflow permissions need to be set to 'Read and write' to be able to push | |
- name: Deploy frontend 🚀 | |
run: | | |
git checkout -B ${{ vars.ENVIRONMENT_STAGE }} | |
git push origin ${{ vars.ENVIRONMENT_STAGE }} --force |