Added docker build pipeline
All checks were successful
Build and Push Multi-Platform Docker Image / build-and-push (push) Successful in 1m16s
All checks were successful
Build and Push Multi-Platform Docker Image / build-and-push (push) Successful in 1m16s
This commit is contained in:
40
.gitea/workflows/tf-server-docker-build.yml
Normal file
40
.gitea/workflows/tf-server-docker-build.yml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Build and Push Multi-Platform Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Print Runner Info
|
||||||
|
run: |
|
||||||
|
echo "Running on: $(uname -a)"
|
||||||
|
echo "Current directory: $(pwd)"
|
||||||
|
ls -l
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
run: |
|
||||||
|
docker buildx create --name mybuilder --use
|
||||||
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
|
- name: Log in to Docker Registry
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
echo "$DOCKER_PASSWORD" | docker login registry.jjnet.se -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
|
||||||
|
- name: Build and Push Multi-Platform Image
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/arm64 \
|
||||||
|
--tag registry.jjnet.se/tf-server:latest \
|
||||||
|
--file DockerFile \
|
||||||
|
--push .
|
||||||
Reference in New Issue
Block a user