Publish Production Image #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Production Image | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.PUBLISH_PACKAGE_PAT }} | |
- name: Build Docker image | |
run: | | |
docker build --build-arg VITE_VERSION="${{ github.event.inputs.version }}" --no-cache -t webserver . | |
docker tag webserver "ghcr.io/pacstall/webserver:${{ github.event.inputs.version }}" | |
docker tag webserver ghcr.io/pacstall/webserver:latest | |
- name: Push Image | |
run: | | |
docker push "ghcr.io/pacstall/webserver:${{ github.event.inputs.version }}" | |
docker push ghcr.io/pacstall/webserver:latest |