Files
gem5/.github/workflows/docker-build.yaml
Bobby R. Bruce 3157cde324 misc: Copy .github directory from develop to stable (#458)
This is done periodically as the Github Action's infrastructure reads
files from the repos main branch (`stable`) where as changes are made to
`develop`'s ".github" which should be made live ASAP.

This does not affect the gem5 build or any configuration scripts, only
how testing is performed via GitHub and other info used by Github (e.g.,
".github/ISSUE_TEMPLATE" which outlines the templates for creating
issues via our GitHub issues page.
2023-10-14 17:16:09 -07:00

55 lines
1.6 KiB
YAML

---
name: Docker images build and push
on:
workflow_dispatch:
jobs:
obtain-dockerfiles:
runs-on: [self-hosted, linux, x64]
container: ghcr.io/gem5/ubuntu-22.04_all-dependencies:latest
steps:
- uses: actions/checkout@v3
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@v3
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:
packages: write
contents: read
steps:
- uses: actions/download-artifact@v3
with:
name: dockerfiles
path: dockerfiles-docker-build
- uses: docker/setup-qemu-action@v2
name: Setup QEMU
- uses: docker/setup-buildx-action@v2
name: Set up Docker Buildx
- uses: docker/login-action@v2
name: Login to the GitHub Container Registry
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push with bake
uses: docker/bake-action@v4
with:
workdir: ./dockerfiles-docker-build
files: docker-bake.hcl
push: true