wip
All checks were successful
Github Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
James Andariese 2024-02-25 13:51:06 -06:00
parent 9d8704d87d
commit e929caaed0

20
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Github Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions (on Gitea) 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: metal-docker
steps:
- name: Check out repository code
uses: actions/checkout@v3
- run: |
ls -la
docker build --progress plain --iidfile iid.txt .
stringprefix() { [ ${#1} -le $2 ] && echo $1 && return 0 || stringprefix "${1%?}" $2 ; }
SHORTSHA="$(stringprefix "$GITHUB_SHA" 8)"
for TAG in "$SHORTSHA" "$GITHUB_REF_NAME";do
docker tag "`cat iid.txt`" "$DOCKER_REGISTRY/$GITHUB_REPOSITORY:$TAG"
docker push "$DOCKER_REGISTRY/$GITHUB_REPOSITORY:$TAG"
done