Skip to content

Denorm return by ref (#24519) #5

Denorm return by ref (#24519)

Denorm return by ref (#24519) #5

name: build-CI-container
env:
REGISTRY: ghcr.io
# NOTE: IMAGE_NAME must be lowercase
IMAGE_NAME: chapel-github-ci
# NOTE: if this filename changes, also update in the on.paths section below
DOCKERFILE: util/packaging/docker/github-ci/Dockerfile
on:
push:
branches: [ main ]
# This limits the action so it only builds when this file changes
paths:
# unfortunately we can't use ${{env.DOCKERFILE}} here
# see https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
- util/packaging/docker/github-ci/Dockerfile
# also trigger on changes to this workflow file itself
- .github/workflows/build-CI-container.yml
pull_request:
paths:
# same as for pushes above
- util/packaging/docker/github-ci/Dockerfile
- .github/workflows/build-CI-container.yml
# Adds a "manual run" option in the GH UI
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker Image
uses: docker/[email protected]
with:
file: ${{ env.DOCKERFILE }}
# example: ghcr.io/chapel-lang/chapel-github-ci:latest
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
- name: Push Docker Image if on main
if: github.repository_owner == 'chapel-lang' && ((github.event.pull_request.head.repo.full_name == github.repository) || (github.event_name == 'push'))
uses: docker/[email protected]
with:
file: ${{ env.DOCKERFILE }}
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest