New Tag scheme
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m3s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m3s
This commit is contained in:
12
.github/workflows/docker.yaml
vendored
12
.github/workflows/docker.yaml
vendored
@@ -29,12 +29,18 @@ jobs:
|
||||
- name: Login to Registry
|
||||
run: buildah login -u ${{ secrets.REGISTRY_USER }} -p ${{ secrets.REGISTRY_PASSWORD }} git.kocoder.xyz
|
||||
|
||||
- name: Generate Tag
|
||||
id: tag
|
||||
run: |
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
echo "value=${{ github.ref_name }}-$(date +%s)-${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Buildah Build
|
||||
run: |
|
||||
buildah build -t ${{ github.sha }} .
|
||||
buildah tag ${{ github.sha }} latest
|
||||
buildah build -t ${{ steps.tag.outputs.value }} .
|
||||
buildah tag ${{ steps.tag.outputs.value }} latest
|
||||
|
||||
- name: Push Docker Images
|
||||
run: |
|
||||
buildah push ${{ github.sha }} docker://git.kocoder.xyz/vt/solid-demo:${{ github.sha }}
|
||||
buildah push ${{ steps.tag.outputs.value }} docker://git.kocoder.xyz/vt/solid-demo:${{ steps.tag.outputs.value }}
|
||||
buildah push latest docker://git.kocoder.xyz/vt/solid-demo:latest
|
||||
|
||||
Reference in New Issue
Block a user