Skip to content

Deploy Images to GHCR #40

Deploy Images to GHCR

Deploy Images to GHCR #40

Workflow file for this run

name: Deploy Images to GHCR
# Only trigger, when the E2E Tests workflow succeeded
on:
workflow_run:
workflows: ["E2E Tests"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
push-store-image:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Set up Gleam, Beam
uses: erlef/setup-beam@v1
with:
otp-version: "26.0.2"
gleam-version: "1.4.1"
rebar3-version: "3"
- run: gleam deps download
- run: gleam build
- run: cd build && gleam export erlang-shipment
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: 'Build Image'
run: |
docker build . --tag ghcr.io/mrgleam/crappy-board:latest
docker push ghcr.io/mrgleam/crappy-board:latest