-
Notifications
You must be signed in to change notification settings - Fork 26
34 lines (26 loc) · 884 Bytes
/
main.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
name: main
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master]
run-name: ${{ github.workflow }} | ${{ github.event.pull_request.number }} ${{ github.event.pull_request.title || github.event.head_commit.message }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: docker build --tag lazamar/nix-package-versions:latest .
working-directory: ./
- name: Test
run: docker run lazamar/nix-package-versions:latest ./utils.sh test
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Upload to Docker Hub
if: github.ref_name == 'master'
run: docker push lazamar/nix-package-versions:latest