Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
702551d66a
|
|||
|
d4331bbef4
|
|||
|
e81cd81797
|
|||
|
9423cbc331
|
|||
|
915a2fc67e
|
|||
|
afec455c18
|
|||
|
0188e62126
|
21
action.yml
21
action.yml
@ -20,6 +20,14 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: get commit hash
|
||||
id: get_hash
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
@ -33,5 +41,16 @@ runs:
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: "{{defaultContext}}:${{ input.path }}"
|
||||
push: true
|
||||
tags: git.tmoron.fr/${{ inputs.name }}:latest
|
||||
tags: git.tmoron.fr/${{ inputs.name }}:${{ steps.get_hash.outputs.sha_short }}
|
||||
|
||||
- name: push to latest branch
|
||||
run: |
|
||||
if git ls-remote --exit-code --heads origin latest; then
|
||||
git switch latest
|
||||
git merge master
|
||||
else
|
||||
git checkout -b latest
|
||||
fi
|
||||
git push origin latest
|
||||
|
||||
Reference in New Issue
Block a user