diff --git a/.github/workflows/build_git.yml b/.github/workflows/build_git.yml new file mode 100644 index 00000000..e42da3ad --- /dev/null +++ b/.github/workflows/build_git.yml @@ -0,0 +1,36 @@ +name: AppManage Build And Push To DockerHub + +on: + push: + branches: [main] + paths: + - "docker/w9git/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/w9git/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/gitea + tags: ${{ env.VERSION }} + addLatest: True + registry: docker.io + dockerfile: appmanage/Dockerfile + directory: appmanage + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/docker/w9git/Dockerfile b/docker/w9git/Dockerfile index cc873f9c..9af9c42f 100644 --- a/docker/w9git/Dockerfile +++ b/docker/w9git/Dockerfile @@ -1,4 +1,7 @@ FROM gitea/gitea:1.20.4 +LABEL maintainer="Websoft9" +LABEL version="1.20.4" + COPY init.sh /usr/local/bin/init.sh COPY ./init /etc/s6/init RUN chmod -R 755 /etc/s6/init /usr/local/bin/init.sh