Skip to content

feat: docker 镜像自动推送 #1

feat: docker 镜像自动推送

feat: docker 镜像自动推送 #1

Workflow file for this run

name: Push image on dev
on:
push:
branches: ["dev"]
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
if: false
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set environment
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: saltwood233/csharp-openbmclapi
- name: Build and push Docker image
id: push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: saltwood233/csharp-openbmclapi:dev