dd
This commit is contained in:
parent
bca009d4bb
commit
4e7b23d891
1 changed files with 6 additions and 3 deletions
|
@ -17,18 +17,21 @@ jobs:
|
|||
# with:
|
||||
# username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Get Meta
|
||||
- name: Extract repository name
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
REPO_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "REPO_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
|
||||
id: extract_branch
|
||||
- name: Build and push Docker image
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_BRANCH }}"
|
||||
tags: "registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:latest,registry.mgrote.net/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.extract_branch.outputs.REPO_BRANCH }}"
|
||||
|
||||
|
||||
# depends on lint
|
||||
|
|
Loading…
Reference in a new issue