Skip to content

Commit

Permalink
Merge pull request #42 from LeiCoin-official/leicoin-pos-v2
Browse files Browse the repository at this point in the history
Leicoin pos v2
  • Loading branch information
LeiCraft authored Dec 29, 2024
2 parents 17bae4c + 0381691 commit 2c4abae
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/docker-publish-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,56 @@ jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Environment
uses: ./.github/workflows/setup

- name: Setup ENV Variables
run: |
echo "IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "FULL_IMAGE_NAME=${{ env.REGISTRY }}/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
images: ${{ env.FULL_IMAGE_NAME }}

- name: Build Binary
run: bun compile linux-x64-baseline ${{ inputs.version }}
run: bun compile linux-x64-baseline ${{ inputs.version }} --no-version-tag

- name: Set Tags
id: set-tags
run: |
echo "tags=${{ env.REGISTRY }}/${{ github.repository }}:${{ inputs.version }}" >> $GITHUB_ENV
echo "tags=${{ env.FULL_IMAGE_NAME }}:${{ inputs.version }}" >> $GITHUB_ENV
if [[ "${{ inputs.pre_release }}" == "false" ]]; then
echo "tags+=,${{ env.REGISTRY }}/${{ github.repository }}:latest" >> $GITHUB_ENV
echo "tags+=,${{ env.FULL_IMAGE_NAME }}:latest" >> $GITHUB_ENV
fi
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: ./docker
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ env.tags }}
labels: |
org.opencontainers.image.title=${{ github.repository }}
org.opencontainers.image.title=${{ steps.meta.outputs.title }}
org.opencontainers.image.description=${{ steps.meta.outputs.description }}
org.opencontainers.image.version=${{ inputs.version }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.created=${{ steps.meta.outputs.created }}
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y curl ca-certificates openssl tar bash g
RUN mkdir /data
WORKDIR /data

COPY ../build/bin/leicoin-node /usr/local/bin/leicoin-node
COPY ./build/bin/leicoin-node-linux-x64-baseline /usr/local/bin/leicoin-node

# LeiCoin Net Port
EXPOSE 12200/tcp
Expand Down

0 comments on commit 2c4abae

Please sign in to comment.