Skip to content

Commit

Permalink
Remove Upload Arctifacts (#28)
Browse files Browse the repository at this point in the history
Remove Upload Arctifacts
  • Loading branch information
Raul-mz authored Nov 29, 2021
1 parent c96295e commit 5ffebd5
Showing 1 changed file with 3 additions and 120 deletions.
123 changes: 3 additions & 120 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,65 +50,9 @@ jobs:
with:
name: adempiere-gRPC-Server.zip
path: build/release/adempiere-gRPC-Server.zip

publish-binaries:
name: Upload Binaries ADempiere-gRPC-Server
needs: build-app
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2

- name: Upload zip
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: adempiere-gRPC-Server.zip/adempiere-gRPC-Server.zip

- name: Upload zip.MD5
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: adempiere-gRPC-Server.zip.MD5/adempiere-gRPC-Server.zip.MD5

- name: Upload tar
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: adempiere-gRPC-Server.tar/adempiere-gRPC-Server.tar

- name: Upload tar.MD5
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: adempiere-gRPC-Server.tar.MD5/adempiere-gRPC-Server.tar.MD5

# Publish docker image in Github Container Registry to application
push-imame-ghcr:
name: Push Docker image to GitHub Container
needs: build-app
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Download build dist app
uses: actions/download-artifact@v2
with:
name: adempiere-gRPC-Server.zip
path: dist

- name: Unzip dist file
run: |
cd dist
unzip -o adempiere-gRPC-Server.zip

- name: move artifact
run: mv build/release/adempiere-gRPC-Server.zip build-docker/

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
Expand Down Expand Up @@ -144,64 +88,3 @@ jobs:
run: echo ${{ steps.docker_build.outputs.digest }}


# Publish docker image in Docker Hub registry to application
push-imame-dhr:
name: Push Docker image to Docker Hub
needs:
- build-app
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Download build dist app
uses: actions/download-artifact@v2
with:
name: adempiere-gRPC-Server.zip
path: dist

- name: Unzip dist file
run: |
cd dist
unzip -o adempiere-gRPC-Server.zip
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
# CONFIGURE DOCKER SECRETS INTO REPOSITORY
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set Lower Case to owner and repository
run: |
ORG=$OWNER
if [ -n "${{ secrets.DOCKERHUB_ORG }}" ]; then
echo "Set secret DOCKERHUB_ORG as namespace"
ORG=${{ secrets.DOCKERHUB_ORG }}
else
echo "Set OWNER ($OWNER) as namespace "
fi
echo "ORG_LC=${ORG,,}" >> ${GITHUB_ENV}
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
echo "REPO_LC=${NAME,,}" >> ${GITHUB_ENV}
env:
# to docker image namespace
OWNER: '${{ github.repository_owner }}'
NAME: '${{ github.event.repository.name }}'

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v4.8

- name: Push image in Docker Hub
uses: docker/build-push-action@v2
with:
context: .
file: ./build-docker/Dockerfile.prod
push: true
tags: |
${{ env.ORG_LC }}/${{ env.REPO_LC }}:${{ github.sha }}
${{ env.ORG_LC }}/${{ env.REPO_LC }}:${{ steps.branch-name.outputs.current_branch }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 5ffebd5

Please sign in to comment.