Update packages on trunk #704
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
# Trigger on pull requests. | |
pull_request: | |
# Trigger on pushes to the mainline branches. These triggers push the built images to Docker Hub. | |
push: | |
branches: | |
- "trunk" | |
# Trigger on request. | |
workflow_dispatch: | |
jobs: | |
start_action_runners: | |
name: Start action runners | |
runs-on: ubuntu-latest | |
steps: | |
- uses: glotzerlab/jetstream2-admin/start@v1.2.2 | |
with: | |
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | |
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | |
Build: | |
name: Build ${{ matrix.configuration }} | |
runs-on: [self-hosted,jetstream2,CPU] | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: [nompi, greatlakes, bridges2, delta, expanse, expanse-gpu] | |
steps: | |
- uses: actions/checkout@v4.1.0 | |
- name: Login to DockerHub | |
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }} | |
uses: docker/login-action@v3.0.0 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Clear existing images | |
run: docker system prune -a -f | |
- name: Build image | |
run: ./build.sh -r glotzerlab ${{ matrix.configuration }} | |
- name: Push image | |
run: docker push -a glotzerlab/software | |
if: github.ref == 'refs/heads/trunk' | |
- name: Slack notification | |
if: ${{ (github.ref == 'refs/heads/trunk') && (failure() || cancelled()) }} | |
uses: 8398a7/action-slack@v3.15.1 | |
with: | |
status: ${{ job.status }} | |
fields: workflow,ref,message,commit | |
mention: channel | |
if_mention: failure,cancelled | |
channel: '#dev-glotzerlab-software' | |
username: Github Action | |
author_name: Build ${{ matrix.configuration }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} |