2024-01-08 08:59:54 +00:00
|
|
|
name: Build Prerelease Image
|
2023-09-26 01:49:23 +00:00
|
|
|
|
|
|
|
on:
|
2024-01-08 08:59:54 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: 'Tag to build'
|
2024-02-12 10:14:07 +00:00
|
|
|
required: true
|
|
|
|
|
|
|
|
##
|
|
|
|
# Invoke:
|
|
|
|
# gh workflow run "Build Prerelease Image" -f tag=2.0.0-canary.0
|
|
|
|
##
|
2024-01-08 08:59:54 +00:00
|
|
|
|
|
|
|
env:
|
2024-02-12 10:14:07 +00:00
|
|
|
IMAGE_TAG: ${{ github.event.inputs.tag }}
|
|
|
|
BUILD_PLATFORMS: linux/amd64,linux/arm64
|
2024-01-08 08:59:54 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
packages: write
|
2023-09-26 01:49:23 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-12-01 15:08:50 +00:00
|
|
|
ghcr-build:
|
2023-09-26 01:49:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-12-01 15:08:50 +00:00
|
|
|
env:
|
|
|
|
IMAGE_NAME: shahradelahi/wireadmin
|
|
|
|
|
2023-09-26 01:49:23 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-12-11 02:00:07 +00:00
|
|
|
- uses: docker/setup-buildx-action@v3
|
2023-09-26 01:49:23 +00:00
|
|
|
|
|
|
|
- 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
|
2023-12-11 02:00:07 +00:00
|
|
|
uses: docker/build-push-action@v5
|
2023-09-26 01:49:23 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
push: true
|
2024-02-12 10:14:07 +00:00
|
|
|
args: VERSION=${{ env.IMAGE_TAG }}
|
2024-01-08 08:59:54 +00:00
|
|
|
tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|
2023-12-01 15:08:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
docker-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
env:
|
|
|
|
IMAGE_NAME: litehex/wireadmin
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-12-11 02:00:07 +00:00
|
|
|
- uses: docker/setup-buildx-action@v3
|
2023-12-01 15:08:50 +00:00
|
|
|
|
|
|
|
- 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 }}
|
2023-12-01 15:08:50 +00:00
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Push to DockerHub
|
2023-12-11 02:00:07 +00:00
|
|
|
uses: docker/build-push-action@v5
|
2023-12-01 15:08:50 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
push: true
|
2024-02-12 10:14:07 +00:00
|
|
|
platforms: ${{ env.BUILD_PLATFORMS }}
|
|
|
|
args: VERSION=${{ env.IMAGE_TAG }}
|
2024-01-08 08:59:54 +00:00
|
|
|
tags: docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|