mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-26 01:20:28 +00:00
38 lines
1,017 B
YAML
38 lines
1,017 B
YAML
name: apphub Build And Push To DockerHub
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "docker/apphub/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/apphub/Dockerfile)
|
|
echo $version
|
|
echo "::set-output name=version::$version"
|
|
new_version=${version},latest
|
|
echo "VERSION=$new_version" >> $GITHUB_ENV
|
|
|
|
- uses: mr-smithers-excellent/docker-build-push@v5
|
|
name: Build & push Docker image
|
|
with:
|
|
image: websoft9dev/apphub
|
|
tags: ${{ env.VERSION }}
|
|
addLatest: True
|
|
registry: docker.io
|
|
dockerfile: docker/apphub/Dockerfile
|
|
directory: docker/apphub
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|