Skip to content

Add basic build and publish workflow #5

Add basic build and publish workflow

Add basic build and publish workflow #5

Workflow file for this run

name: Build gfx90a Docker image
on:
push:
branches:
- main
paths:
- envs/x86/gfx90a/**
- .github/workflows/build-gfx90a.yml
- AGENTS.md
- README.md
pull_request:
paths:
- envs/x86/gfx90a/**
- .github/workflows/build-gfx90a.yml
- AGENTS.md
- README.md
workflow_dispatch:
jobs:
build:
name: Build gfx90a image
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-gfx90a-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-gfx90a-
- name: Build docker image
uses: docker/build-push-action@v5
with:
context: .
file: envs/x86/gfx90a/Dockerfile
push: true
tags: |
higherordermethods/selfish:gfx90a
higherordermethods/selfish:gfx90a-${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache