Skip to content

apps-update

apps-update #299

Workflow file for this run

name: Publish phenix Docker images
on:
push:
branches: ['**']
repository_dispatch:
types: [apps-update]
env:
MM_REV: e8ce6d1
jobs:
push-to-ghcr:
name: Push phenix Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Get short SHA
run: |
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/phenix
tags: |
type=ref,event=branch
type=sha
- name: Build container image
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile
build-args: |
MM_MIN_REV=${{ env.MM_REV }}
PHENIX_COMMIT=${{ env.sha }}
PHENIX_TAG=${{ fromJSON(steps.meta.outputs.json).tags[0] }}
APPS_REPO=github.com/${{ github.event_name == 'repository_dispatch' && github.event.client_payload.repo || 'sandialabs/sceptre-phenix-apps' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
outputs:
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
push-jit-to-ghcr:
name: Push phenix JIT Docker image to GitHub Packages
runs-on: ubuntu-latest
needs: push-to-ghcr
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Get short SHA
run: |
echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}/phenix-jit-ui
tags: |
type=ref,event=branch
type=sha
- name: Build container image
uses: docker/build-push-action@v3
with:
context: docker/jit
file: docker/jit/Dockerfile
build-args: |
PHENIX_REPO=${{ github.repository }}
PHENIX_IMG=${{ needs.push-to-ghcr.outputs.image }}
PHENIX_BRANCH=${{ github.head_ref || github.ref_name }}
push: true
tags: ${{ steps.meta.outputs.tags }}