Skip to content

[integration-test] Also trigger CI build when workflow changes #3

[integration-test] Also trigger CI build when workflow changes

[integration-test] Also trigger CI build when workflow changes #3

name: Integration Test Image
on:
push:
paths:
- 'integration-test/**'
- '.github/workflows/integration-test.yml'
pull_request:
paths:
- 'integration-test/**'
- '.github/workflows/integration-test.yml'
release:
types: [published]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration-test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
run: |
TAG=$(echo $GITHUB_REF | cut -d / -f 3)
echo "GHCR_TAG=ghcr.io/${{github.repository}}/circt-integration-test:$TAG" >> $GITHUB_ENV
- name: Build image
run: docker build . --tag $GHCR_TAG
- name: Push image
if: ${{ github.event_name == 'release' }}
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
docker push $GHCR_TAG