Skip to content

Commit

Permalink
Add GitHub Actions workflow for building and publishing Docker images…
Browse files Browse the repository at this point in the history
… on unstable branch
  • Loading branch information
kevinlee-06 committed Jan 20, 2025
1 parent c371bad commit a06a79a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish-ghcr-unstable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker Image CI for Unstable Branch

on:
push:
branches:
- unstable
pull_request:
branches:
- unstable

jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build and push
run: |
export TZ="Asia/Taipei"
VERSION=$(date +'%Y-%m-%d.%H.%M.%S')
docker login ghcr.io -u kevinlee-06 -p ${{secrets.GH_PAT}};
docker build -t ghcr.io/kevinlee-06/linklie:${VERSION} .
docker tag ghcr.io/kevinlee-06/linklie:${VERSION} ghcr.io/kevinlee-06/linklie:unstable
docker push ghcr.io/kevinlee-06/linklie:${VERSION}
docker push ghcr.io/kevinlee-06/linklie:unstable

0 comments on commit a06a79a

Please sign in to comment.