first commit
Some checks failed
Build and push Docker images / build-and-push (push) Failing after 2m33s
Some checks failed
Build and push Docker images / build-and-push (push) Failing after 2m33s
This commit is contained in:
48
.github/workflows/docker-build-and-push.yaml
vendored
Normal file
48
.github/workflows/docker-build-and-push.yaml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
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
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
with:
|
||||
github-server-url: https://chef.heaplab.deib.polimi.it/git
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/mlir0c2701f
|
||||
docker build -t ${REGISTRY}/${IMAGE_NAME} -f Dockerfile .
|
||||
|
||||
- name: Log in to the Container registry
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: niccolon
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Push Docker image
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
id: push
|
||||
run: |
|
||||
docker push ${REGISTRY}/${IMAGE_NAME}
|
||||
Reference in New Issue
Block a user