Skip to content

Require Inko 0.16.0 or newer #18

Require Inko 0.16.0 or newer

Require Inko 0.16.0 or newer #18

Workflow file for this run

---
name: Push
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/inko:latest
steps:
- run: microdnf install --quiet --assumeyes tar git
- uses: actions/checkout@v4
- run: inko --version
- run: inko test
fmt:
runs-on: ubuntu-latest
container:
image: ghcr.io/inko-lang/inko:latest
steps:
- run: microdnf install --quiet --assumeyes tar git
- uses: actions/checkout@v4
- run: inko --version
- run: inko fmt --check
container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs:
- test
- fmt
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v4
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}