docker-images/.gitea/workflows/publish.yaml

60 lines
1.7 KiB
YAML
Raw Normal View History

2023-03-27 20:35:12 +00:00
name: Publish
on:
push:
branches:
2023-03-30 20:52:55 +00:00
- "master"
2023-03-27 20:35:12 +00:00
jobs:
docker:
strategy:
matrix:
2023-03-30 20:52:55 +00:00
arch: ["ubuntu-latest"]
git-version: ["2.38.4"]
2023-03-27 20:35:12 +00:00
runs-on: ${{ matrix.arch }}
steps:
- name: checkout
2023-04-06 15:29:13 +00:00
uses: actions/checkout@v2
with:
submodules: recursive
2023-04-11 01:51:14 +00:00
# bob
2023-04-06 15:29:13 +00:00
- name: Set up SSH keys
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa git.fascinated.cc >> ~/.ssh/known_hosts
2023-03-27 20:35:12 +00:00
- name: Download docker
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-03-30 20:52:55 +00:00
&& rm -rf /tmp/*
2023-03-27 20:35:12 +00:00
- name: Set up Docker Buildx
2023-04-06 15:29:13 +00:00
uses: docker/setup-buildx-action@v2
2023-03-27 20:35:12 +00:00
- name: Login to Repo
2023-04-06 15:29:13 +00:00
uses: docker/login-action@v2
2023-03-27 20:35:12 +00:00
with:
registry: git.fascinated.cc
username: ${{ secrets.REPO_USERNAME }}
password: ${{ secrets.REPO_TOKEN }}
2023-03-27 21:31:11 +00:00
- name: Build and push (Node 18.x)
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-03-27 21:44:48 +00:00
file: ./gitea-runner/Node18xDockerfile
2023-03-30 20:52:55 +00:00
tags: git.fascinated.cc/fascinated/gitea-runner:node-18
2023-04-11 01:45:43 +00:00
- name: Build and push (Nginx PHP)
uses: docker/build-push-action@v4
with:
push: true
context: ./gitea-runner
file: ./gitea-runner/NginxPHPDockerfile
tags: git.fascinated.cc/fascinated/nginx-php:latest