Reviewed-on: #3
This commit is contained in:
2024-03-05 17:02:18 +00:00
parent f24913560c
commit 6a96be9347
2 changed files with 8 additions and 5 deletions

View File

@@ -23,14 +23,14 @@ jobs:
run: docker login -u cjyar -p "${{ secrets.DOCKER_TOKEN }}"
- uses: actions/checkout@v4
- name: build
run: docker build -t ${{ inputs.image_name }}:${{ github.run_number }} .
run: docker build -t ${{ inputs.image_name }}:${{ gitea.run_number }} .
- name: push
if: ${{ inputs.push == 'true' }}
run: |
docker create --name run_${{ github.run_number }} ${{ inputs.image_name }}:${{ github.run_number }}
docker export -o /tmp/image run_${{ github.run_number }}
docker rm run_${{ github.run_number }}
docker create --name run_${{ gitea.run_number }} ${{ inputs.image_name }}:${{ gitea.run_number }}
docker export -o /tmp/image run_${{ gitea.run_number }}
docker rm run_${{ gitea.run_number }}
tar -x -C /tmp -f /tmp/image tag
tag=$(cat /tmp/tag)
docker tag ${{ inputs.image_name }}:${{ github.run_number }} ${{ inputs.image_name }}:$tag
docker tag ${{ inputs.image_name }}:${{ gitea.run_number }} ${{ inputs.image_name }}:$tag
docker push ${{ inputs.image_name }}:$tag

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# CI/CD
This repo holds common workflows for CI or CD, and other bits of shared automation.