Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de71278bf9 |
@@ -15,37 +15,39 @@ jobs:
|
|||||||
|
|
||||||
- name: Print version and repository
|
- name: Print version and repository
|
||||||
run: echo "Runner working on repository ${{ gitea.repository }} and on tag ${{ GITHUB_REF_NAME }} ${{ gitea.ref_name }}"
|
run: echo "Runner working on repository ${{ gitea.repository }} and on tag ${{ GITHUB_REF_NAME }} ${{ gitea.ref_name }}"
|
||||||
|
- name: Print test
|
||||||
|
run: echo "ref_name is ${{ gitea.ref_name }}"
|
||||||
|
|
||||||
- name: Install Docker engine
|
# - name: Install Docker engine
|
||||||
run: |
|
# run: |
|
||||||
apt-get update
|
# apt-get update
|
||||||
apt-get -y install curl dnsutils
|
# apt-get -y install curl dnsutils
|
||||||
install -m 0755 -d /etc/apt/keyrings
|
# install -m 0755 -d /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
# 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
|
# 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
|
# 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 update
|
||||||
apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
# apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
||||||
|
|
||||||
- name: Git clone private repo
|
# - name: Git clone private repo
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
with:
|
# with:
|
||||||
repository: staffadmin/gitea-runner
|
# repository: staffadmin/gitea-runner
|
||||||
persist-credentials: false
|
# persist-credentials: false
|
||||||
ssh-strict: false
|
# ssh-strict: false
|
||||||
token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
# token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
||||||
ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
# ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
||||||
|
|
||||||
- name: Login to docker private registry
|
# - name: Login to docker private registry
|
||||||
uses: docker/login-action@v3
|
# uses: docker/login-action@v3
|
||||||
with:
|
# with:
|
||||||
registry: ${{ vars.REGISTRY_DOCKER }}
|
# registry: ${{ vars.REGISTRY_DOCKER }}
|
||||||
username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
# username: ${{ secrets.REGISTRY_DOCKER_USER }}
|
||||||
password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
# password: ${{ secrets.REGISTRY_DOCKER_PASS }}
|
||||||
|
|
||||||
- name: Build and push image in registry
|
# - name: Build and push image in registry
|
||||||
uses: docker/build-push-action@v5
|
# uses: docker/build-push-action@v5
|
||||||
with:
|
# with:
|
||||||
context: .
|
# context: .
|
||||||
push: true
|
# push: true
|
||||||
tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ GITHUB_REF_NAME }}
|
# 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