43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Build and push Docker images
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 1440
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
attestations: write
|
|
id-token: write
|
|
|
|
env:
|
|
REGISTRY: docker.io
|
|
IMAGE_NAME: niccolon/raptor-deps-mlir0c2701f
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
run: |
|
|
git clone --depth 1 --branch ${GITHUB_REF_NAME} \
|
|
https://chef.heaplab.deib.polimi.it/git/${GITHUB_REPOSITORY}.git \
|
|
${GITHUB_WORKSPACE}
|
|
|
|
- name: Build and Push with Kaniko
|
|
uses: aevea/action-kaniko@v0.10.0 # High-level wrapper for Kaniko
|
|
with:
|
|
image: niccolon/raptor-deps-mlir0c2701f
|
|
cache: true
|
|
path: mlir0c2701f
|
|
build_file: mlir0c2701f/Dockerfile
|
|
username: niccolon
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
# Extra args to handle the specific environment
|
|
extra_args: "--snapshot-mode=redo --use-new-run"
|