Skip to content

Commit

Permalink
deploy dev2
Browse files Browse the repository at this point in the history
  • Loading branch information
mark86092 committed Dec 11, 2024
1 parent 572e34f commit d19eab5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- dev
- dev2
pull_request:

jobs:
Expand Down Expand Up @@ -92,6 +93,22 @@ jobs:
- run: docker compose -f .github/docker-compose-dev.yml build
- run: docker tag ${IMAGE} ${REGISTRY}/${REPO}:dev
- run: docker push ${REGISTRY}/${REPO}:dev
docker-dev2:
name: Deploy docker image
if: github.repository == 'goodjoblife/GoodJobShare' && github.event_name == 'push' && github.ref == 'refs/heads/dev2'
runs-on: ubuntu-latest
needs:
- test
env:
REGISTRY: docker.pkg.github.com
REPO: goodjoblife/goodjobshare/web-server-dev
IMAGE: goodjobshare:dev
steps:
- uses: actions/checkout@v4
- run: docker login ${REGISTRY} -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- run: docker compose -f .github/docker-compose-dev.yml build
- run: docker tag ${IMAGE} ${REGISTRY}/${REPO}:dev2
- run: docker push ${REGISTRY}/${REPO}:dev2
deploy-stage:
if: github.repository == 'goodjoblife/GoodJobShare' && github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
Expand All @@ -118,3 +135,16 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
-d '{"event_type": "goodjobshare-dev-published"}' \
https://api.github.com/repos/goodjoblife/goodjob-deploy-ci/dispatches
deploy-dev2:
if: github.repository == 'goodjoblife/GoodJobShare' && github.event_name == 'push' && github.ref == 'refs/heads/dev2'
runs-on: ubuntu-latest
needs:
- docker-dev2
steps:
- name: Deploy dev
run: |
curl --user "${{ secrets.DEPLOY_CI_TOKEN }}" \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-d '{"event_type": "goodjobshare-dev2-published"}' \
https://api.github.com/repos/goodjoblife/goodjob-deploy-ci/dispatches

0 comments on commit d19eab5

Please sign in to comment.