Skip to content

Commit

Permalink
Automate build to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadyita committed Jan 24, 2024
1 parent a1ed0cc commit 8928e21
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Build and push docker image
on:
push:
branches:
- main
tags:
- '*'
jobs:
build:
name: Create docker image
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login to registries
shell: bash
run: |
echo "${{ secrets.GHCR_PAT }}" | docker login -u nadyita --password-stdin ghcr.io
- name: Build and push the Docker image
shell: bash
run: |
docker buildx build \
--push \
--file Dockerfile \
--tag "ghcr.io/nadybot/pork-history-syncer:latest" \
--tag "ghcr.io/nadybot/pork-history-syncer:latest-$(date +'%Y%m%d-%H%M%S')" \
.

0 comments on commit 8928e21

Please sign in to comment.