Test buildah docker build.
Some checks failed
Build and Push Docker Image / build (push) Failing after 12s
Some checks failed
Build and Push Docker Image / build (push) Failing after 12s
This commit is contained in:
@@ -2,7 +2,7 @@ name: Build and Push Docker Image
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -18,25 +18,24 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build Docker Image
|
- name: Buildah Build
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.ref_name }}
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
SHORT_HASH: ${{ github.sha }}
|
SHORT_HASH: ${{ github.sha }}
|
||||||
run: |
|
uses: redhat-actions/buildah-build@v2
|
||||||
# Build the image with the commit hash tag
|
with:
|
||||||
docker build --build-arg BUILD_IDENTIFIER=${SHORT_HASH:0:5} -t git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}-${SHORT_HASH:0:5} .
|
containerfiles: "Dockerfile"
|
||||||
|
iamge: git.kocoder.xyz/kocoded/vt-be
|
||||||
# Tag the same image as "latest"
|
tags: ${{ github.ref_name }} latest
|
||||||
docker tag git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}-${SHORT_HASH:0:5} git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}-latest
|
|
||||||
|
|
||||||
- name: Push Docker Images
|
- name: Push Docker Images
|
||||||
env:
|
env:
|
||||||
BRANCH_NAME: ${{ github.ref_name }}
|
BRANCH_NAME: ${{ github.ref_name }}
|
||||||
SHORT_HASH: ${{ github.sha }}
|
SHORT_HASH: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
docker push git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}-${SHORT_HASH:0:5}
|
docker push git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}
|
||||||
docker push git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}-latest
|
docker push git.kocoder.xyz/kocoded/vt-be:latest
|
||||||
|
|
||||||
- name: Log out from registry
|
- name: Log out from registry
|
||||||
if: always()
|
if: always()
|
||||||
run: docker logout git.kocoder.xyz
|
run: docker logout git.kocoder.xyz
|
||||||
|
|||||||
Reference in New Issue
Block a user