Skip to content

Add github action that pushes images to ghcr.io (#3) #19

Add github action that pushes images to ghcr.io (#3)

Add github action that pushes images to ghcr.io (#3) #19

Workflow file for this run

name: Deploy
on:
push:
branches:
- "main"
tags:
- "v*.*.*"
permissions:
packages: write
jobs:
ci:
name: Build and Push
runs-on: ubuntu-latest
strategy:
matrix:
project: [fwxvi, fwxvii]
steps:
- uses: actions/checkout@v5
name: Checkout Repository
with:
persist-credentials: false
- name: Docker meta
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
with:
images: |
ghcr.io/uw-midsun/devcontainers/${{ matrix.project }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
name: Container Registry Login
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd
name: Install Nix
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
env:
PROJECT: ${{ matrix.project }}
TAGS: ${{ steps.meta.outputs.tags }}
run: ./ci/ci