Add .gitea/workflows/build-base-image.yaml
Code Quality Test / Quality-Check (push) Successful in 2s Details
Build Docker Image for Actions / Build-Image (push) Has been cancelled Details
Build Docker Image for Actions / Check-Last-Time (push) Has been cancelled Details
Environment Setup Test / Setup (push) Successful in 1m11s Details

pull/4/head
drunkendog 2023-08-28 18:01:11 +01:00
parent ae478fda9d
commit b97c67ba4a
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
name: Build Docker Image for Actions
on: [push, pull_request]
jobs:
Check-Last-Time:
runs-on: ubuntu-22.04
steps:
- name: Check last repository build time
id: last-time
run: curl -s https://hub.docker.com/v2/repositories/drunkendog/standard-build-actions/tags/latest
| jq '.last_updated'
| xargs -i date --date {} +%s
| xargs -i expr $(date +%s) - {}
- name: Check out repository code
uses: actions/checkout@v3
- name: Get Docker
run: curl -sL get.docker.io | bash
- name: Build and upload image
run: sh actions/build-docker-image.sh
Build-Image:
needs: [Check-Last-Time]
if: Check-Last-Time.outputs.last-time < 1
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Get Docker
run: curl -sL get.docker.io | bash
- name: Build and upload image
run: sh actions/build-docker-image.sh