Deploy Images to GHCR #31
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: 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 |