Claptrap-ui/.github/workflows/docker_release.yml

42 lines
1007 B
YAML
Raw Normal View History

2022-07-04 11:51:13 +02:00
name: Build Dev Docker
on:
push:
tags:
- "**"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- 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