tst
This commit is contained in:
@@ -15,37 +15,39 @@ jobs:
|
||||
|
||||
- name: Print version and repository
|
||||
run: echo "Runner working on repository ${{ gitea.repository }} and on tag ${{ GITHUB_REF_NAME }} ${{ gitea.ref_name }}"
|
||||
|
||||
- name: Install Docker engine
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get -y install curl dnsutils
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
||||
- name: Print test
|
||||
run: echo "ref_name is ${{ gitea.ref_name }}"
|
||||
|
||||
- name: Git clone private repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: staffadmin/gitea-runner
|
||||
persist-credentials: false
|
||||
ssh-strict: false
|
||||
token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
||||
ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
||||
# - name: Install Docker engine
|
||||
# run: |
|
||||
# apt-get update
|
||||
# apt-get -y install curl dnsutils
|
||||
# install -m 0755 -d /etc/apt/keyrings
|
||||
# curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
# chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
# echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
# apt-get update
|
||||
# apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
||||
|
||||
- name: Login to docker private registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY_DOCKER }}
|
||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
||||
# - name: Git clone private repo
|
||||
# uses: actions/checkout@v4
|
||||
# with:
|
||||
# repository: staffadmin/gitea-runner
|
||||
# persist-credentials: false
|
||||
# ssh-strict: false
|
||||
# token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
||||
# ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
||||
|
||||
- name: Build and push image in registry
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ GITHUB_REF_NAME }}
|
||||
# - name: Login to docker private registry
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ${{ vars.REGISTRY_DOCKER }}
|
||||
# username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
||||
# password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
||||
|
||||
# - name: Build and push image in registry
|
||||
# uses: docker/build-push-action@v5
|
||||
# with:
|
||||
# context: .
|
||||
# push: true
|
||||
# tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ GITHUB_REF_NAME }}
|
||||
Reference in New Issue
Block a user