Skip to content

Commit

Permalink
Merge pull request #6 from SADiLaR/feature/auto_deployment_from_devel…
Browse files Browse the repository at this point in the history
…op_branch

Create deployment action for develop branch
  • Loading branch information
jrb-s2c-github authored Apr 9, 2024
2 parents 7be70c2 + 7ec194a commit 9866d47
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# https://docs.docker.com/build/ci/github-actions/push-multi-registries/
name: docker_push

on:
workflow_dispatch:
push:
branches:
- "develop"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to SADiLaR Container Registry
uses: docker/login-action@v3
with:
registry: docker.sadilar.org
username: ${{ vars.SADILAR_DOCKER_REPOSITORY_USER }}
password: ${{ secrets.SADILAR_DOCKER_REPOSITORY_SECRET }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: |
docker.sadilar.org/term_platform:latest
- name: Use webhook action to start deployment
uses: joelwmale/[email protected]
with:
url: https://api.bitbucket.org/2.0/repositories/team_sadilar/ansible/pipelines/
headers: '{"Authorization": "Bearer ${{ secrets.BITBUCKET_PIPELINE_SECRET }}"}'
body: '{"target": {"ref_type": "branch", "type": "pipeline_ref_target", "ref_name": "master", "selector": {"type": "custom", "pattern": "deploy_term_platform" } }}'

0 comments on commit 9866d47

Please sign in to comment.