This commit is contained in:
2023-11-19 16:09:28 +01:00
parent 33995326a8
commit 9bac7be2b6
2 changed files with 26 additions and 5 deletions

View File

@@ -0,0 +1,22 @@
name: ci/cd with perso debian image to build and push docker image in private registry
#https://docs.docker.com/build/ci/github-actions/push-multi-registries/
#https://www.devsync.se/ci/cd/docker/2023/10/27/gitea-runner-build-docker-containers.html
on: [push]
jobs:
build-push-docker-image-perso:
# see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
runs-on: test
container:
image: registry.jingoh.fr/test-alpine:latest
credentials:
username: ${{ secrets.REGISTRY_DOCKER_USER }}
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
# runs-on: ubuntu-latest
# container: node:16-bullseye
steps:
- name: Show node
run: node -v

View File

@@ -17,9 +17,8 @@ jobs:
# container: node:16-bullseye
steps:
- name: Show version and repository
run: echo "Runner working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- run: echo "🐧 This job is now running on a ${{ runner.image }} container"
- name: Show Information
run: echo "Runner ${{ runner.os }} triggered by ${{ gitea.event_name }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- name: Install dnsutils and git (github actions)
run: |
@@ -66,5 +65,5 @@ jobs:
push: true
tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
- name: Show docker images
run: docker images
- name: Output
run: ech "Push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}"