-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (33 loc) · 1.56 KB
/
push_docker_test_container.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Publish Docker Test Container
on:
push:
branches:
- master
- main
- 'ci-release-test/**'
jobs:
publish-test-container:
runs-on: ubuntu-latest
environment: publish
steps:
- uses: actions/checkout@v3
- name: Init submodules
run: git submodule update --init --recursive
- name: Build TestContainer
run: ./exaslct build-test-container --force-rebuild
- name: Push TestContainer image
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/main') }}
run: |
./exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push
env: # Set the secret as an input
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
TARGET_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
SOURCE_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
- name: Push ci-release-test TestContainer image
if: ${{ (github.ref != 'refs/heads/master') && (github.ref != 'refs/heads/main') }}
run: |
./exaslct push-test-container --source-docker-username "$SECRET_DOCKER_USER_NAME" --target-docker-username "$SECRET_DOCKER_USER_NAME" --force-push --source-docker-tag-prefix ci_release_test --target-docker-tag-prefix ci_release_test
env: # Set the secret as an input
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
TARGET_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
SOURCE_DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}