28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
name: Build nginx main
|
|
run-name: Build nginx main docker image
|
|
on: [push]
|
|
jobs:
|
|
Explore-Gitea-Actions:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Prepare | Setup git
|
|
run: |
|
|
git config --global user.name "Radim Lipovčan"
|
|
git config --global user.email "radim@lipovcan.cz"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Build | Install Docker
|
|
run: |
|
|
apt-get update && apt-get install docker.io -y
|
|
- name: Build | Clone repository
|
|
run: |
|
|
git clone https://github.com/Ownercz/nginx-php8.x.git
|
|
cd nginx-php8.x && ls -lah
|
|
- name: Login to Docker Hub
|
|
run: |
|
|
cd nginx-php8.x
|
|
echo "${{ secrets.DOCKERHUB_GITEA_TOKEN }}" | docker login -u ownercz --password-stdin
|
|
ls -lah
|
|
docker build -t ownercz/nginx-main:latest -t ownercz/nginx-main:$(git rev-parse --short=10 HEAD) .
|
|
docker push ownercz/nginx-main:$(git rev-parse --short=10 HEAD)
|
|
docker push ownercz/nginx-main:latest |