sthope a7ffc53ade
Some checks failed
Docker / build (push) Failing after 17s
first commit
2025-03-18 20:19:30 +01:00

42 lines
1.0 KiB
YAML
Executable File

name: Docker
on:
schedule:
- cron: '0 6 * * 0'
push:
branches: [ "main" ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
env:
# Use docker.io or ghcr.io
REGISTRY: docker.io
RELEASE: latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Extract repository name
id: repo_name
run: echo "IMAGE_NAME=${{ github.repository.split('/')[1] }}" >> $GITHUB_ENV && echo $IMAGE_NAME
- name: Build Docker Image
run: docker build -t ${{ env.IMAGE_NAME }} .
- name: Push Docker Image
run: docker push ${{ env.REGISTRY }}/${{ secrets.DOCKER_USER }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE }}