-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (75 loc) · 3.31 KB
/
ci-unified.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ci-unified
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "ci-unified/*"
- ".github/workflows/ci-unified.yml"
workflow_dispatch:
env:
REGISTRY_PATH: "docker.io/paritytech"
REGISTRY_PATH_PR: "docker.io/paritypr"
IMAGE_NAME: "ci-unified"
RUST_STABLE_VERSION: "1.81.0"
RUST_NIGHTLY_VERSION: "2024-11-19"
FORKLIFT_VERSION: "0.13.2"
CODECOV_UPLOADER_VERSION: "v0.7.3"
CODECOV_CLI_VERSION: "v0.6.0"
DISTRO_CODENAME: "bullseye"
jobs:
Build:
runs-on: parity-default
environment: ${{ github.event_name == 'workflow_dispatch' && 'main' || null }}
steps:
- uses: actions/checkout@v4
- name: set vars
id: vars
run: |
export COMMIT_SHA=${{ github.sha }}
IMAGE_DATE_TAG="${COMMIT_SHA:0:8}-$(date +%Y%m%d)"
echo "IMAGE_DATE_TAG=${IMAGE_DATE_TAG}" >> $GITHUB_OUTPUT
DATESTAMP=$(date +%Y%m%d%H%M)
echo "DATESTAMP=${DATESTAMP}" >> $GITHUB_OUTPUT
echo $IMAGE_DATE_TAG $DATESTAMP
# - name: build and push staging
# if: ${{ github.event_name == 'pull_request' }}
# # uses: ./.github/actions/build-push-image-selfhosted
# uses: ./.github/actions/build-push-image
# with:
# registry: ${{ env.REGISTRY_PATH_PR }}
# image-name: ${{ env.IMAGE_NAME }}
# registry-user: ${{ secrets.REGISTRY_USER }}
# registry-password: ${{ secrets.REGISTRY_PASSWORD }}
# image-tags: |
# ${{ env.REGISTRY_PATH_PR }}/${{ env.IMAGE_NAME }}:staging
# ${{ env.REGISTRY_PATH_PR }}/${{ env.IMAGE_NAME }}:staging-${{ env.DISTRO_CODENAME }}-${{ env.RUST_STABLE_VERSION }}-v${{ steps.vars.outputs.DATESTAMP }}
# build-args: |
# RUST_STABLE_VERSION=${{ env.RUST_STABLE_VERSION }}
# RUST_NIGHTLY_VERSION=${{ env.RUST_NIGHTLY_VERSION }}
# FORKLIFT_VERSION=${{ env.FORKLIFT_VERSION }}
# CODECOV_UPLOADER_VERSION=${{ env.CODECOV_UPLOADER_VERSION }}
# CODECOV_CLI_VERSION=${{ env.CODECOV_CLI_VERSION }}
# DISTRO_CODENAME=${{ env.DISTRO_CODENAME }}
- name: build and push
# if: ${{ github.event_name == 'workflow_dispatch' }}
# uses: ./.github/actions/build-push-image-selfhosted
uses: ./.github/actions/build-push-image
with:
push: false
registry: ${{ env.REGISTRY_PATH }}
image-name: ${{ env.IMAGE_NAME }}
registry-user: ${{ secrets.REGISTRY_USER }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
image-tags: |
docker.io/paritytech/ci-unified:bullseye-1.81.0 \
docker.io/paritytech/ci-unified:bullseye-1.81.0-v202411281558
docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-11-19
docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-11-19-v202411281558
docker.io/paritytech/ci-unified:latest
build-args: |
RUST_STABLE_VERSION=${{ env.RUST_STABLE_VERSION }}
RUST_NIGHTLY_VERSION=${{ env.RUST_NIGHTLY_VERSION }}
FORKLIFT_VERSION=${{ env.FORKLIFT_VERSION }}
CODECOV_UPLOADER_VERSION=${{ env.CODECOV_UPLOADER_VERSION }}
CODECOV_CLI_VERSION=${{ env.CODECOV_CLI_VERSION }}
DISTRO_CODENAME=${{ env.DISTRO_CODENAME }}