forked from neonevm/neon-tests
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (49 loc) · 1.92 KB
/
dockerize_neon_tests.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Docker Image for all neon tests
on:
push:
branches:
- develop
- '[vt][0-9].[0-9]+.[0-9x]+*'
workflow_dispatch:
inputs:
oz_tag:
type: string
required: false
description: "Which OZ tag to use (if it is empty 'latest', branch will be used)"
jobs:
dockerize:
runs-on: ["self-hosted", "k8s-prod"]
steps:
- uses: actions/checkout@v4
- name: Define env
id: define-env
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == 'develop' ]]; then
tag='latest'
oz_tag='latest'
elif [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.ref_name }}" == 'develop' && ( "${{ github.event.inputs.oz_tag }}" == 'latest' || "${{ github.event.inputs.oz_tag }}" == "" ) ]]; then
tag='latest'
oz_tag='latest'
elif [[ "${{ github.event.inputs.oz_tag }}" != "" ]]; then
tag='${{ github.event.inputs.oz_tag }}'
oz_tag='${{ github.event.inputs.oz_tag }}'
elif [[ "${{ github.ref_name }}" == 'base-fee' ]]; then
tag='base-fee'
oz_tag='latest'
else
tag='${{ github.sha }}'
oz_tag='latest'
fi
echo "tag=${tag}"
echo "oz_tag=${oz_tag}"
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "oz_tag=${oz_tag}" >> $GITHUB_OUTPUT
- name: "Dockerize neon tests"
uses: ./.github/actions/dockerize-neon-tests
with:
image_tag: ${{ steps.define-env.outputs.tag }}
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
oz_tag: ${{ steps.define-env.outputs.oz_tag }}
image_name: ${{ github.repository_owner }}/neon_tests
docker_hub_org_name: ${{ github.repository_owner }}