Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Zblocker64 authored Mar 18, 2024
1 parent 438b4ea commit beb0f6e
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
name: Docker Image CI

name: Publish to Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

branches:
- main
permissions:
packages: write
contents: read
jobs:

build:

publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- name: Checkout
uses: actions/checkout@v4
# Add your test steps here if needed...
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/zblocker64/publish-packages/game
tags: type=sha
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit beb0f6e

Please sign in to comment.