misc: Fix docker-build.yaml (#1588)
This is an attempt to get the docker build workflow working
This commit is contained in:
51
.github/workflows/docker-build.yaml
vendored
51
.github/workflows/docker-build.yaml
vendored
@@ -1,54 +1,39 @@
|
|||||||
---
|
---
|
||||||
name: Docker images build and push
|
name: Docker images build and push
|
||||||
|
|
||||||
|
#on:
|
||||||
|
# push:
|
||||||
|
# branches:
|
||||||
|
# - 'develop'
|
||||||
|
# paths:
|
||||||
|
# - util/dockerfiles/**
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
obtain-dockerfiles:
|
bake:
|
||||||
runs-on: [self-hosted, linux, x64]
|
runs-on: [self-hosted, linux, x64]
|
||||||
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest
|
container: ghcr.io/gem5/ubuntu-24.04_all-dependencies:latest
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
# Scheduled workflows run on the default branch by default. We
|
|
||||||
# therefore need to explicitly checkout the develop branch.
|
|
||||||
ref: develop
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: dockerfiles
|
|
||||||
path: util/dockerfiles
|
|
||||||
|
|
||||||
# This builds and pushes the docker image.
|
|
||||||
build-and-push:
|
|
||||||
runs-on: [self-hosted, linux, x64]
|
|
||||||
needs: obtain-dockerfiles
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- name: Checkout
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
name: dockerfiles
|
|
||||||
path: dockerfiles-docker-build
|
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v2
|
- name: Set up Docker Buildx
|
||||||
name: Setup QEMU
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v2
|
- name: Login to GitHub Container Registry
|
||||||
name: Set up Docker Buildx
|
uses: docker/login-action@v3
|
||||||
|
|
||||||
- uses: docker/login-action@v2
|
|
||||||
name: Login to the GitHub Container Registry
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push with bake
|
- name: Build and push
|
||||||
uses: docker/bake-action@v4
|
uses: docker/bake-action@v5
|
||||||
with:
|
with:
|
||||||
workdir: ./dockerfiles-docker-build
|
workdir: util/dockerfiles
|
||||||
files: docker-bake.hcl
|
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
Reference in New Issue
Block a user