1159cl/.gitea/workflows/docker.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

2023-05-17 23:24:51 +00:00
name: Build docker image
on:
push:
branches: [ main ]
jobs:
2023-05-18 01:14:34 +00:00
test:
uses: ./.gitea/workflows/deno.yml
2023-05-17 23:24:51 +00:00
build-image:
runs-on: ubuntu-latest
timeout-minutes: 5
2023-05-18 01:03:44 +00:00
needs: test
2023-05-17 23:24:51 +00:00
steps:
- name: Checkout
uses: actions/checkout@v3
2023-05-18 01:51:02 +00:00
- name: Update repository
run: apt update
2023-05-18 01:40:57 +00:00
2023-05-18 01:51:02 +00:00
- name: Install docker
2023-05-18 02:21:21 +00:00
run: |
apt-get update
apt-get install ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
2023-05-18 02:24:57 +00:00
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
2023-05-18 02:21:21 +00:00
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
2023-05-18 01:38:33 +00:00
2023-05-18 01:55:35 +00:00
- name: test docker
run: docker login
2023-05-17 23:24:51 +00:00
- name: Authentication
uses: docker/login-action@v2
with:
registry: git.1159.cl
username: ${{ github.repository_owner }}
password: ${{ secrets.GITEA_TOKEN }}
2023-05-18 01:29:41 +00:00
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: mario1159/1159cl:latest