mirror of
https://github.com/XFox111/backbone.git
synced 2026-04-22 07:17:59 +03:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: "CI pipeline"
|
|
|
|
on:
|
|
release:
|
|
types: [ published ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
packages: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Update assembly version
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
sed -i 's|AssemblyVersion("1.0.0.0")|AssemblyVersion("${{ github.ref_name }}")|' Program.cs
|
|
|
|
- uses: docker/metadata-action@v5
|
|
id: meta
|
|
with:
|
|
images: |
|
|
${{ github.repository }}
|
|
ghcr.io/${{ github.repository }}
|
|
tags: |
|
|
latest
|
|
${{ github.ref_name }}
|
|
|
|
- name: "Login to Docker Hub"
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: "Login to GitHub Container Registry"
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|