mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-05-04 10:33:47 +01:00
feat: add docker build to release workflow
This commit is contained in:
parent
e1619da871
commit
8d341af69d
1 changed files with 30 additions and 1 deletions
31
.github/workflows/release.yaml
vendored
31
.github/workflows/release.yaml
vendored
|
@ -149,4 +149,33 @@ jobs:
|
|||
name: v${{ env.VERSION }}
|
||||
draft: true
|
||||
prerelease: ${{ startsWith(env.VERSION, '0') }}
|
||||
files: artifacts/*
|
||||
files: artifacts/*
|
||||
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
needs: [ prepare ]
|
||||
if: ${{ needs.prepare.outputs.found == 'false' }}
|
||||
env:
|
||||
VERSION: ${{ needs.prepare.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: https://ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/stefanuk12/registry:latest
|
||||
ghcr.io/stefanuk12/registry:v${{ env.VERSION }}
|
||||
ghcr.io/stefanuk12/registry:${{ github.sha }}
|
||||
|
|
Loading…
Add table
Reference in a new issue