test docker build
This commit is contained in:
parent
9d6b9e40a7
commit
7016c7b7fb
1 changed files with 30 additions and 0 deletions
30
.forgejo/workflows/docker-release.yml
Normal file
30
.forgejo/workflows/docker-release.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Docker Image Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get tag name
|
||||
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to Docker Hub
|
||||
run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
IMAGE_NAME=creations/profile-page
|
||||
docker build --target release -t $IMAGE_NAME:${{ env.TAG }} -t $IMAGE_NAME:latest .
|
||||
|
||||
- name: Push Docker image
|
||||
run: |
|
||||
IMAGE_NAME=creations/profile-page
|
||||
docker push $IMAGE_NAME:${{ env.TAG }}
|
||||
docker push $IMAGE_NAME:latest
|
Loading…
Add table
Reference in a new issue