metadata/.github/workflows/ci.yml

32 lines
812 B
YAML
Raw Normal View History

2024-04-04 20:09:04 +00:00
name: ci
on:
- push
jobs:
docker:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
2025-02-25 19:56:29 +00:00
permissions:
contents: read
packages: write
2024-04-04 20:09:04 +00:00
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
2025-02-25 19:56:29 +00:00
password: ${{ secrets.GITHUB_TOKEN }}
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
2024-04-04 20:09:04 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}:latest