metadata/.github/workflows/ci.yml

34 lines
829 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
2025-02-25 20:37:56 +00:00
id-token: write
2025-02-25 19:56:29 +00:00
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 }}
2024-04-04 20:09:04 +00:00
2025-02-25 20:37:56 +00:00
- name: Configure npm authentication
run: |
echo "//npm.pkg.github.com/:_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