Skip to content

Add auth when building containers #18

Add auth when building containers

Add auth when building containers #18

Workflow file for this run

name: Push to GHCR
on:
push:
branches-ignore:
- wip/*
env:
TAG: ${{ github.ref_name }}
jobs:
push-ghcr:
name: Build and push image to GHCR
runs-on: ubuntu-latest
steps:
- name: Echo inputs
run: env; echo $TAG
shell: sh
- name: Checkout
uses: actions/checkout@v3
- name: Build containers
run: docker-compose build
shell: sh
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push containers to GHCR
run: docker-compose push
shell: sh