Skip to content

Commit

Permalink
add pub script
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Feb 5, 2024
1 parent 0c613fb commit d9d3d0b
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker-pub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker Pub

on: workflow_dispatch

jobs:
name: Buid and push Docker image to GitHub Container registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Build Meta
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
id: meta

- name: Login to GitHub Container registry
uses: docker/login-action@v1
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
registry: ghcr.io
username: $GITHUB_USER
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Docker Image
env:
REGISTRY: ghcr.io
OWNER: barelyhuman
IMAGE_NAME: ${{ github.repository }}
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.dtag }}

0 comments on commit d9d3d0b

Please sign in to comment.