Skip to content

fix: Add perms to plugin.yml #3

fix: Add perms to plugin.yml

fix: Add perms to plugin.yml #3

name: Build and Publish Docker Image
on:
push:
branches:
- 'master'
workflow_dispatch:
env:
IMAGE_NAME: "openaudiomc-client"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tag
id: tag
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "tag=latest" >> $GITHUB_ENV
else
echo "tag=${{ github.ref_name }}" >> $GITHUB_ENV
fi
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: client
file: client/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.tag }}