-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (34 loc) · 1.01 KB
/
docker-hub.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: docker-hub
on:
push:
branches: main
schedule:
- cron: '1 */24 * * *'
jobs:
docker-hub:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Install requred packages
- name: Install apt packages
run: sudo apt-get install -y jq moreutils
# Checkout repository
- name: Checkout
uses: actions/checkout@v3
# Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Run script that checks for new versions and triggers builds
- name: Run build script
run: ./script.sh fetch --verbose
# Commit data.json file if changed detected
- name: Commit data.json metadata file
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update data.json file with new versions
branch: main
file_pattern: data.json