-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow for building and publishing Docker images…
… on unstable branch
- Loading branch information
1 parent
c371bad
commit a06a79a
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |