Skip to content

Commit

Permalink
Push images to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
GAsplund committed Jan 26, 2024
1 parent 15dced5 commit 1122313
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pins
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build docker container
runs-on: ubuntu-latest

permissions:
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image (and push on main)
uses: docker/build-push-action@v4.0.0
with:
push: ${{ github.ref == 'refs/heads/main' }}
tags: ghcr.io/cthit/pins:latest

0 comments on commit 1122313

Please sign in to comment.