Skip to content

More workflows

More workflows #2

Workflow file for this run

name: releng-scripts
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'releng-scripts/*'
- '.github/workflows/releng-scripts.yml'
workflow_dispatch:
env:
REGISTRY_PATH: 'docker.io/paritytech'
REGISTRY_PATH_PR: 'docker.io/paritypr'
IMAGE_NAME: 'releng-scripts'
jobs:
Build:
runs-on: ubuntu-latest
environment: ${{ github.event_name == 'workflow_dispatch' && 'main' || null }}
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
- name: clone releng-scripts
run: git clone https://github.com/paritytech/releng-scripts
- name: build and push staging
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/actions/build-push-image
with:
context: ./releng-scripts
registry: ${{ env.REGISTRY_PATH_PR }}
registry-user: ${{ secrets.REGISTRY_USER }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
staging
- name: build and push
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: ./.github/actions/build-push-image
with:
context: ./releng-scripts
registry: ${{ env.REGISTRY_PATH }}
registry-user: ${{ secrets.REGISTRY_USER }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
image-name: ${{ env.IMAGE_NAME }}
image-tags: >
${{ steps.vars.outputs.IMAGE_DATE_TAG }}
latest