wireadmin/.github/workflows/docker-image.yaml

67 lines
1.5 KiB
YAML
Raw Normal View History

2024-01-08 08:59:54 +00:00
name: Build Prerelease Image
on:
2024-01-08 08:59:54 +00:00
workflow_dispatch:
inputs:
tag:
description: 'Tag to build'
required: false
env:
IMAGE_TAG: canary-${{ github.event.inputs.tag || github.sha }}
permissions:
contents: read
packages: write
jobs:
ghcr-build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: shahradelahi/wireadmin
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PRIVATE_TOKEN }}
- name: Push to GitHub Container Registry
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
2024-01-08 08:59:54 +00:00
tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker-build:
runs-on: ubuntu-latest
env:
IMAGE_NAME: litehex/wireadmin
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
2023-12-01 15:12:00 +00:00
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to DockerHub
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
2024-01-08 08:59:54 +00:00
tags: docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}