Skip to content

Commit

Permalink
Add GitHub Actions
Browse files Browse the repository at this point in the history
DockerHub's autobuild is just too slow.

Closes: #3
  • Loading branch information
taoky committed Jul 1, 2024
1 parent a610f5c commit bef589e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
env:
IMAGE: "ustclug/ftp:latest"
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: |
docker pull "$IMAGE"
docker build --cache-from "$IMAGE" -t build-image .
docker tag build-image "$IMAGE"
- name: Push to Docker Hub
if: "github.repository == 'ustclug/lugftp'"
run: |
docker login -u "${{ secrets.DOCKER_USER }}" -p "${{ secrets.DOCKER_PASS }}"
docker push "$IMAGE"

0 comments on commit bef589e

Please sign in to comment.