mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Create docker-image-push.yml
This commit is contained in:
parent
bfde6c23f2
commit
66ebf66b4a
1 changed files with 19 additions and 0 deletions
19
.github/workflows/docker-image-push.yml
vendored
Normal file
19
.github/workflows/docker-image-push.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: Push to Docker Hub
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
run: echo "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
|
||||||
|
continue-on-error: false
|
||||||
|
- name: Get release tag
|
||||||
|
run: echo "TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build . --file Dockerfile --tag johrpan/ubigen:$TAG --tag johrpan/ubigen:latest
|
||||||
|
- name: Push Docker image
|
||||||
|
run: docker push johrpan/ubigen:$TAG && docker push johrpan/ubigen:latest
|
||||||
Loading…
Add table
Add a link
Reference in a new issue