Require Inko 0.16.0 or newer #18
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: 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 }} |