42 lines
1011 B
YAML
42 lines
1011 B
YAML
name: Build release Docker
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "**"
|
|
|
|
jobs:
|
|
build-docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: ⬇️ Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🛠️ Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: 🔒 Login to ghcr.io
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: 🛠️ Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v5.4
|
|
|
|
- name: 🛠️ Set tag
|
|
run: |
|
|
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
|
|
|
|
- name: 🔨 Build and push Docker
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
push: true
|
|
context: .
|
|
tags: |
|
|
ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}
|
|
ghcr.io/sebclem/claptrapbot-ui:latest
|
|
file: ./Dockerfile
|