1
0
mirror of https://github.com/gilbN/theme.park.git synced 2024-09-11 19:32:24 +02:00

dockerhub job

This commit is contained in:
GilbN 2022-03-20 17:36:31 +01:00 committed by GitHub
parent 8b96ee449a
commit 19b3a4405a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,4 +32,31 @@ jobs:
if: ${{ github.ref == 'refs/heads/live_develop' }}
run: |
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park:develop --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
docker push --all-tags ghcr.io/gilbn/theme.park:develop
docker push --all-tags ghcr.io/gilbn/theme.park
push_to_dockerhub:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Set current date as env variable
id: date_time
run: echo ::set-output name=NOW::$(date +'%Y-%m-%dT%H:%M:%S')
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DH_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build&push
if: ${{ github.ref == 'refs/heads/live' }}
run: |
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag ghcr.io/gilbn/theme.park --tag ghcr.io/gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
docker push ghcr.io/gilbn/theme.park
if: ${{ github.ref == 'refs/heads/live_develop' }}
run: |
docker build docker/ --build-arg TP_RELEASE=${{ steps.get_version.outputs.VERSION }} --build-arg BUILD_DATE=${{ steps.date_time.outputs.NOW }} --tag gilbn/theme.park:develop --tag gilbn/theme.park:${{ steps.get_version.outputs.VERSION }}
docker push --all-tags gilbn/theme.park