POUSh
This commit is contained in:
@@ -14,14 +14,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# - name: Print to Log
|
# TEST
|
||||||
# id: print-to-log
|
- name: Print vars test
|
||||||
# env:
|
run: echo ${{ var.REGISTRY_DOCKER }} ${{ vars.REGISTRY_DOCKER }}
|
||||||
# REGISTRY: registry.jingoh.fr
|
- name: Print Gitea runner tag
|
||||||
# uses: https://github.com/actions/hello-world-docker-action@main
|
run: echo {{ env.GITEA_RUNNER_TAG }}
|
||||||
# with:
|
- name: Get all Gitea runner variables
|
||||||
# who-to-greet: ${{ env.REGISTRY }}
|
uses: actions/get-variables-action@v1
|
||||||
|
with:
|
||||||
|
env: true
|
||||||
|
- name: Print all Gitea runner variables
|
||||||
|
run: echo {{ toJson(steps.get-variables-action.outputs.allVariables) }}
|
||||||
- name: Checkout private tools
|
- name: Checkout private tools
|
||||||
uses: https://github.com/actions/checkout@v3
|
uses: https://github.com/actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@@ -29,10 +32,10 @@ jobs:
|
|||||||
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 }} # `GH_PAT` is a secret that contains your PAT
|
token: ${{ secrets.ACCESS_TOKEN_GIT }}
|
||||||
ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
ssh-known-hosts: ${{ secrets.SSH_KNOWN_GITEA }}
|
||||||
|
|
||||||
# Install DOCKER
|
# INSTALL docker
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get install ca-certificates curl gnupg
|
- run: apt-get install ca-certificates curl gnupg
|
||||||
- run: install -m 0755 -d /etc/apt/keyrings
|
- run: install -m 0755 -d /etc/apt/keyrings
|
||||||
@@ -42,25 +45,28 @@ jobs:
|
|||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
- run: apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||||
|
|
||||||
|
# BUILD & PUSH docker image
|
||||||
- name: Build the Docker image
|
- name: Build the Docker image
|
||||||
run: docker build . --file Dockerfile --tag test:$(date +%s)
|
run: docker build . --file Dockerfile --tag test:$(date +%s)
|
||||||
|
# - name: Login to registry
|
||||||
|
# run: docker login -u "test:test" https://registry.jingoh.fr
|
||||||
|
|
||||||
# # Install the cosign tool except on PR
|
# # # Install the cosign tool except on PR
|
||||||
# # https://github.com/sigstore/cosign-installer
|
# # # https://github.com/sigstore/cosign-installer
|
||||||
- name: Install cosign
|
# - name: Install cosign
|
||||||
#if: gitea.event_name != 'pull_request'
|
# #if: gitea.event_name != 'pull_request'
|
||||||
uses: https://github.com/sigstore/cosign-installer@v2.6.0 #v2.6.0
|
# uses: https://github.com/sigstore/cosign-installer@v2.6.0 #v2.6.0
|
||||||
with:
|
# with:
|
||||||
cosign-release: 'v1.11.0'
|
# cosign-release: 'v1.11.0'
|
||||||
|
# # Workaround: https://github.com/docker/build-push-action/issues/461
|
||||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
# - name: Setup Docker buildx
|
||||||
- name: Setup Docker buildx
|
# uses: https://github.com/docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
||||||
uses: https://github.com/docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
|
||||||
|
|
||||||
# Login against a Docker registry except on PR
|
# Login against a Docker registry except on PR
|
||||||
# https://github.com/docker/login-action
|
# https://github.com/docker/login-action
|
||||||
|
|
||||||
- name: Log into registry ${{ env.REGISTRY_DOCKER }}
|
- name: Log into registry ${{ env.REGISTRY_DOCKER }}
|
||||||
#if: gitea.event_name != 'pull_request'
|
env:
|
||||||
|
REGISTRY_DOCKER: registry.jingoh.fr
|
||||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY_DOCKER }}
|
registry: ${{ env.REGISTRY_DOCKER }}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ name: Gitea Actions Demo
|
|||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
on: [never]
|
on: [never]
|
||||||
|
|
||||||
|
## Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# Exemple https://github.com/actions/starter-workflows/blob/main/ci/docker-publish.yml
|
|
||||||
|
|
||||||
# Container image that runs your code
|
# Container image that runs your code
|
||||||
FROM alpine:3.10
|
FROM alpine:3.10
|
||||||
|
|||||||
Reference in New Issue
Block a user