2023-10-08 15:33:34 +00:00
|
|
|
name: Publish Docker Image
|
|
|
|
|
2023-03-27 20:35:12 +00:00
|
|
|
on:
|
2023-10-15 00:20:18 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
2023-03-27 20:35:12 +00:00
|
|
|
push:
|
|
|
|
branches:
|
2023-04-14 19:23:53 +00:00
|
|
|
- "master"
|
2023-03-27 20:35:12 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
2023-10-11 22:16:28 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2023-03-27 20:35:12 +00:00
|
|
|
steps:
|
2023-05-03 05:48:56 +00:00
|
|
|
- name: Checkout
|
2023-10-08 15:33:34 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Restore Docker Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
id: docker-cache
|
|
|
|
with:
|
|
|
|
path: /usr/bin/docker
|
|
|
|
key: ${{ runner.os }}-docker
|
2023-03-27 20:35:12 +00:00
|
|
|
|
2023-10-08 15:33:34 +00:00
|
|
|
- name: Install Docker (if not cached)
|
|
|
|
if: steps.docker-cache.outputs.cache-hit != 'true'
|
2023-03-27 20:35:12 +00:00
|
|
|
run: |
|
|
|
|
wget -q -O /tmp/docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.23.tgz \
|
|
|
|
&& tar --extract --file /tmp/docker.tgz --directory /usr/bin --strip-components 1 --no-same-owner docker/docker \
|
2023-10-08 15:33:34 +00:00
|
|
|
&& rm -rf /tmp/* &&
|
|
|
|
echo "Done"
|
2023-03-27 20:35:12 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2023-10-08 15:33:34 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2023-03-27 20:35:12 +00:00
|
|
|
|
|
|
|
- name: Login to Repo
|
2023-10-08 15:33:34 +00:00
|
|
|
uses: docker/login-action@v2
|
2023-03-27 20:35:12 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.REPO_USERNAME }}
|
|
|
|
password: ${{ secrets.REPO_TOKEN }}
|
|
|
|
|
2023-10-15 00:08:50 +00:00
|
|
|
- name: Build and Push (Latest NodeJS)
|
2023-03-27 20:35:12 +00:00
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
push: true
|
2023-03-27 21:43:13 +00:00
|
|
|
context: ./gitea-runner
|
2023-09-25 01:15:06 +00:00
|
|
|
file: ./gitea-runner/NodeLatestDockerfile
|
2023-10-08 15:35:34 +00:00
|
|
|
tags: fascinated/docker-images:node-latest
|
2023-10-15 00:08:50 +00:00
|
|
|
|
|
|
|
- name: Build and Push (Latest NodeJS - pnpm)
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
context: ./gitea-runner
|
|
|
|
file: ./gitea-runner/NodeWithPnpmLatestDockerfile
|
|
|
|
tags: fascinated/docker-images:node-pnpm-latest
|