Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecc25c2c3d | ||
|
|
5beab5571a | ||
|
|
b5d34fc48c | ||
|
|
ef6bdf58ce |
@@ -0,0 +1,32 @@
|
|||||||
|
name: Docker
|
||||||
|
run-name: Build and Publish Service
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set Environment Variables
|
||||||
|
id: vars
|
||||||
|
env:
|
||||||
|
repository: ${{gitea.repository}}
|
||||||
|
ref_name: ${{gitea.ref_name}}
|
||||||
|
run: |
|
||||||
|
echo $repository
|
||||||
|
echo ::set-output name=OWNER::${repository#/*}
|
||||||
|
echo ::set-output name=PROJECT::${repository#*/}
|
||||||
|
echo $ref_name
|
||||||
|
echo ::set-output name=TAG::${ref_name#refs/*/}
|
||||||
|
-
|
||||||
|
name: Push Image
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: 192.168.1.2:5000/${{gitea.repository}}:${{steps.vars.outputs.TAG}}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
FROM jenkins/jenkins:latest
|
||||||
|
USER root
|
||||||
|
RUN apt-get update && apt-get install -y lsb-release
|
||||||
|
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \
|
||||||
|
https://download.docker.com/linux/debian/gpg
|
||||||
|
RUN echo "deb [arch=$(dpkg --print-architecture) \
|
||||||
|
signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \
|
||||||
|
https://download.docker.com/linux/debian \
|
||||||
|
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
|
||||||
|
RUN apt-get update && apt-get install -y docker-ce-cli
|
||||||
|
USER jenkins
|
||||||
|
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"
|
||||||
Reference in New Issue
Block a user