Skip to content

Commit a09491f

Browse files
Merge pull request #43 from SADiLaR/docker_push_from_master
Create docker push action for main branch
2 parents 49b764e + cfb9cd7 commit a09491f

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/workflows/main.yml renamed to .github/workflows/develop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# https://docs.docker.com/build/ci/github-actions/push-multi-registries/
2-
name: docker_push
2+
name: docker_push_deploy_test
33

44
on:
55
workflow_dispatch:
@@ -8,7 +8,7 @@ on:
88
- "develop"
99

1010
jobs:
11-
docker:
11+
deploy_test:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout

.github/workflows/production.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# https://docs.docker.com/build/ci/github-actions/push-multi-registries/
2+
name: docker_push_prod
3+
4+
on:
5+
push:
6+
tags:
7+
- v**
8+
9+
jobs:
10+
docker_push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
- name: Login to SADiLaR Container Registry
18+
uses: docker/login-action@v3
19+
with:
20+
registry: docker.sadilar.org
21+
username: ${{ vars.SADILAR_DOCKER_REPOSITORY_USER }}
22+
password: ${{ secrets.SADILAR_DOCKER_REPOSITORY_SECRET }}
23+
- name: Build and push
24+
uses: docker/build-push-action@v5
25+
with:
26+
context: .
27+
platforms: linux/amd64
28+
push: true
29+
tags: |
30+
docker.sadilar.org/term_platform:${{ github.ref_name }}

0 commit comments

Comments
 (0)