This commit is contained in:
parent
da0ad79f06
commit
70421e9ec3
@ -13,6 +13,8 @@ env:
|
||||
# Use docker.io or ghcr.io
|
||||
REGISTRY: docker.io
|
||||
RELEASE: latest
|
||||
USER: sthopeless
|
||||
IMAGE: ${{ github.repository.split('/')[1] }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -31,12 +33,18 @@ jobs:
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
|
||||
- name: Extract repository name
|
||||
if: ${{ env.REGISTRY == 'docker.io' }}
|
||||
id: repo_name
|
||||
run: echo "IMAGE_NAME=${{ github.repository.split('/')[1] }}" >> $GITHUB_ENV && echo $IMAGE_NAME
|
||||
run: echo "IMAGE_NAME=${{ env.USER }}/${{ env.IMAGE }}:${{ env.RELEASE }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Extract repository name
|
||||
if: ${{ env.REGISTRY == 'ghcr.io' }}
|
||||
id: repo_name
|
||||
run: echo "IMAGE_NAME=${{ env.REGISTRY }}/${{ env.USER }}/${{ env.IMAGE }}:${{ env.RELEASE }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ secrets.DOCKER_USER }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE }}
|
||||
tags: ${{ env.IMAGE_NAME }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user