wireadmin/.github/workflows/release.yaml

88 lines
2.4 KiB
YAML
Raw Normal View History

2024-04-26 21:36:57 +00:00
name: Release Package
on:
2024-04-26 21:36:57 +00:00
workflow_dispatch:
inputs:
tag:
description: 'Tag to build'
required: true
2024-01-08 08:59:54 +00:00
env:
BUILD_PLATFORMS: linux/amd64,linux/arm64
2024-04-26 21:36:57 +00:00
IMAGE_TAG: ${{ github.event.inputs.tag }}
2024-01-08 08:59:54 +00:00
permissions:
contents: read
packages: write
jobs:
2024-04-26 21:36:57 +00:00
release:
needs: [github-registry, docker-hub]
runs-on: ubuntu-latest
2024-04-26 21:36:57 +00:00
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
commit: 'chore(release): version package'
title: 'chore(release): version package'
publish: changeset publish
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
2024-04-26 21:36:57 +00:00
github-registry:
name: Push to GitHub Container Registry
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
platforms: ${{ env.BUILD_PLATFORMS }}
2024-04-26 21:36:57 +00:00
args: VERSION=${{ env.IMAGE_TAG }}
2023-12-15 07:15:36 +00:00
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest,ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
2024-04-26 21:36:57 +00:00
docker-hub:
name: Push to DockerHub
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
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
platforms: ${{ env.BUILD_PLATFORMS }}
2024-04-26 21:36:57 +00:00
args: VERSION=${{ env.IMAGE_TAG }}
2024-04-20 20:06:45 +00:00
tags: docker.io/${{ env.IMAGE_NAME }}:latest,docker.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}