Skip to content

Commit

Permalink
Build in github
Browse files Browse the repository at this point in the history
Signed-off-by: Carsten Munk <[email protected]>
  • Loading branch information
stskeeps committed Apr 24, 2024
1 parent 75240cd commit 89adcff
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build
on: [push]
permissions:
id-token: write
packages: write
contents: read
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Retrieve environment variables
run: make env >> $GITHUB_ENV

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository_owner }}/cartesi-lambada-base-image,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/v') }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Download dependencies
run: make download

- name: Build docker image
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
tags: zippiehq/cartesi-lambada-base-image:devel
push: false
load: true

- name: Push docker image
id: docker_push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
tags: ${{ steps.docker_meta.outputs.tags }}
push: true
load: false

0 comments on commit 89adcff

Please sign in to comment.