-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.19 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build Leaderboard Image
run-name: Based on ${{ github.sha }}
on: workflow_dispatch
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout HEAD Commit
uses: actions/[email protected]
with:
ref: main
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.12'
- name: Install pipenv
run: pip install pipenv
- name: Export requirement.txt
run: PIPENV_DONT_LOAD_ENV=1 pipenv requirements > requirements.txt
- name: Export Docker Build Tag
id: tag
run: echo "value=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: DockerHub Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Build and Push
uses: docker/[email protected]
with:
context: '.'
file: Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/leaderboard:${{ steps.tag.outputs.value }}