File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # Pull the Docker images from Docker Hub on schedule
2+ name : Pull Docker Images
3+
4+ on :
5+ schedule :
6+ # Runs "At 00:00 on day-of-month 1 in every 2nd month."
7+ - cron : ' 0 0 1 */2 *'
8+
9+ jobs :
10+ pull-images :
11+ name : Pull Development Images
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout the repository
15+ uses : actions/checkout@v3
16+
17+ - name : Fetch and check out latest tag
18+ run : |
19+ git fetch --tags
20+ LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
21+ echo "Checking out latest tag: $LATEST_TAG"
22+ git checkout $LATEST_TAG
23+ echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
24+
25+ - name : Pull Development Image
26+ run : docker compose -f docker-compose.dev.yml pull
27+
28+ - name : Pull Tagged Image
29+ run : |
30+ sed -i -e "s/latest/${{ env.LATEST_TAG }}/g" docker-compose.dev.yml
31+ docker compose -f docker-compose.dev.yml pull
You can’t perform that action at this time.
0 commit comments