Skip to content

Remainig workflows

Remainig workflows #3

Workflow file for this run

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"
IMAGE_NAME: "ci-unified"
RUST_STABLE_VERSION: "1.81.0"
RUST_NIGHTLY_VERSION: "2024-09-11"
FORKLIFT_VERSION: "0.13.2"
CODECOV_UPLOADER_VERSION: "v0.7.3"
CODECOV_CLI_VERSION: "v0.6.0"
DISTRO_CODENAME: "bullseye"
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set vars
id: vars
run: |
export COMMIT_SHA=${{ github.sha }}
echo "IMAGE_DATE_TAG='${COMMIT_SHA:0:8}-$(date +%Y%m%d)'" >> $GITHUB_OUTPUT
echo 'DATESTAMP=$(git log -1 --pretty=format:"%ad" --date=format:"%Y%m%d%H%M" -- dockerfiles/$IMAGE_NAME/*)' >> $GITHUB_OUTPUT
- name: build and push staging
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/build-push-image
with:
registry: ${{ env.REGISTRY_PATH }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
staging
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
with:
registry: ${{ env.REGISTRY_PATH }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
${{ env.IMAGE_NAME }}:${{ env.DISTRO_CODENAME }}-${{ env.RUST_STABLE_VERSION }}"
${{ env.IMAGE_NAME }}:${{ env.DISTRO_CODENAME }}-${{ env.RUST_STABLE_VERSION }}-v${{ steps.vars.outputs.DATESTAMP }}"
${{ env.IMAGE_NAME }}:${{ env.DISTRO_CODENAME }}-${{ env.RUST_STABLE_VERSION }}-${{ env.RUST_NIGHTLY_VERSION }}"
${{ env.IMAGE_NAME }}:${{ env.DISTRO_CODENAME }}-${{ env.RUST_STABLE_VERSION }}-${{ env.RUST_NIGHTLY_VERSION }}-v${{ steps.vars.outputs.DATESTAMP }}"
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 }}