Skip to content

Commit

Permalink
environments for branches without commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oscrx committed Aug 7, 2023
1 parent e737f27 commit a502fca
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,23 @@ jobs:
# https://docs.docker.com/build/building/cache/backends/#cache-mode

deploy:
if: ${{ github.event_name != 'pull_request' }}
# TODO label the PR with preview while doing this
needs:
- docker
runs-on: ubuntu-latest
environment: kubernetes
permissions:
contents: write
steps:
- name: Branch deploy info
if: ${{ github.event_name == 'pull_request' }}
run: echo "ArgoCD might already be at it if the 'preview' label is set."

- name: Checkout
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v3

# TODO only commit while on main, branches deploy dynamically

- name: Deploy using Argo CD
if: ${{ github.event_name != 'pull_request' }}
run: |
# Access the commit SHA from GitHub context
COMMIT_SHA="${{ github.sha }}"
Expand Down

0 comments on commit a502fca

Please sign in to comment.