mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-26 01:20:28 +00:00
push portainer to dockerhub
This commit is contained in:
parent
10b9fc712a
commit
1db322c8f6
3 changed files with 39 additions and 1 deletions
36
.github/workflows/build_deploy.yml
vendored
Normal file
36
.github/workflows/build_deploy.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: portainer Build And Push To DockerHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "docker/w9deploy/Dockerfile"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docker image
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TAGS: latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
name: Check out code
|
||||
|
||||
- name: Get version
|
||||
run: |
|
||||
version=$(grep -Po '(?<=LABEL version=").*?(?=")' docker/w9deploy/Dockerfile)
|
||||
echo $version
|
||||
echo "::set-output name=version::$version"
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- uses: mr-smithers-excellent/docker-build-push@v5
|
||||
name: Build & push Docker image
|
||||
with:
|
||||
image: websoft9dev/deploy
|
||||
tags: ${{ env.VERSION }}
|
||||
addLatest: True
|
||||
registry: docker.io
|
||||
dockerfile: docker/w9deploy/Dockerfile
|
||||
directory: docker/w9deploy
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
@ -7,4 +7,6 @@ RUN chmod +x /init_portainer
|
|||
|
||||
# step2: copy build go program to portainer
|
||||
FROM portainer/portainer-ce:2.19.0
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
LABEL version="2.19.0"
|
||||
COPY --from=builder /init_portainer /
|
|
@ -1,4 +1,4 @@
|
|||
APP_NAME=git
|
||||
APP_NAME=websoft9-git
|
||||
APP_VERSION=1.20.4
|
||||
APP_NETWORK=websoft9
|
||||
|
||||
|
|
Loading…
Reference in a new issue