mirror of
https://github.com/wireadmin/wireadmin
synced 2025-06-26 18:28:06 +00:00
Update deps and add action for publishing on dockerhub
This commit is contained in:
47
.github/workflows/docker-image.yaml
vendored
47
.github/workflows/docker-image.yaml
vendored
@@ -7,16 +7,16 @@ on:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
env:
|
||||
IMAGE_NAME: shahradelahi/wireadmin
|
||||
|
||||
jobs:
|
||||
build:
|
||||
ghcr-build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
IMAGE_NAME: shahradelahi/wireadmin
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
@@ -47,3 +47,42 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}${{ env.RELEASE_TAG }}
|
||||
|
||||
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
IMAGE_NAME: litehex/wireadmin
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: docker.io
|
||||
username: litehex
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Set image tag
|
||||
run: |
|
||||
if [[ $GITHUB_REF == refs/tags/v* ]]; then
|
||||
echo "Labeling image with TAG: ${GITHUB_REF#refs/tags/v}"
|
||||
echo "IMAGE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
echo "RELEASE_TAG=,docker.io/${IMAGE_NAME}:latest" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Labeling image with commit SHA: ${GITHUB_SHA}"
|
||||
echo "IMAGE_TAG=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Push to DockerHub
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}${{ env.RELEASE_TAG }}
|
||||
Reference in New Issue
Block a user