Add basic tox test workflow (#22) #55
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 image | |
# Run the tasks on every push | |
on: push | |
jobs: | |
build_push_api: | |
name: Build and push image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write # needed for signing the images with GitHub OIDC Token | |
packages: write # required for pushing container images | |
security-events: write # required for pushing SARIF files | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Calculate metadata for image | |
id: image-meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/stackhpc/os-capacity | |
# Produce the branch name or tag and the SHA as tags | |
tags: | | |
type=ref,event=branch | |
type=ref,event=tag | |
type=sha,prefix= | |
- name: Build and push image | |
uses: azimuth-cloud/github-actions/docker-multiarch-build-push@master | |
with: | |
cache-key: os-capacity | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ${{ steps.image-meta.outputs.tags }} | |
labels: ${{ steps.image-meta.outputs.labels }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} |