Docker images build and push #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker images build and push | |
on: | |
workflow_dispatch: | |
jobs: | |
# This builds and pushes the docker image. | |
build-and-push: | |
runs-on: [self-hosted, linux, x64, run] | |
permissions: | |
packages: write | |
contents: read | |
container: gcr.io/gem5-test/ubuntu-22.04_all-dependencies:latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout the develop branch | |
with: | |
# Scheduled workflows run on the default branch by default. We | |
# therefore need to explicitly checkout the develop branch. | |
ref: develop | |
- 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@v3 | |
with: | |
files: util/dockerfiles/docker-bake.hcl | |
push: true |