Skip to content

Commit

Permalink
dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
wo-o committed Oct 25, 2024
1 parent 94ed0fe commit b8923c4
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 416 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/build-release-artifacts.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/ci-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and Push to Docker Hub

on:
workflow_dispatch:
push:
branches:
- main

env:
DOCKERHUB_REPOSITORY: jinnuae40/story
NETWORK: iliad

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: |
echo "COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "VERSION=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
echo "BUILDNUM=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
echo "REPOSITORY_URI=$DOCKERHUB_REPOSITORY" >> $GITHUB_ENV
echo "NETWORK=$NETWORK" >> $GITHUB_ENV
- uses: docker/setup-buildx-action@v2

- uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-

- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- run: |
docker buildx create --use
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm64/v8 \
--build-arg COMMIT=$COMMIT \
--build-arg VERSION=$VERSION \
--build-arg BUILDNUM=$BUILDNUM \
--build-arg NETWORK=$NETWORK \
-t $REPOSITORY_URI:latest \
-t $REPOSITORY_URI:$COMMIT \
-t $REPOSITORY_URI:$VERSION \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
--push \
-f ./Dockerfile \
.
65 changes: 0 additions & 65 deletions .github/workflows/ci-foundry.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/ci-pr.yml

This file was deleted.

184 changes: 0 additions & 184 deletions .github/workflows/ci-s3.yml

This file was deleted.

Loading

0 comments on commit b8923c4

Please sign in to comment.