All checks were successful
Main / build-and-push-docker-image (20.x) (push) Successful in 8m4s
d secret and env variables into dockerfile and gihub actions files, remade dockerfile and github actions added build stage fix build step remove the second section asdas test new file fix env variables env enable corepack test yarn install new base remove corepack fix yarn install yarn install new base (again) new base corepack install yarn enable corepack revert base fix yarn yarn install fix build errors new file remove in-line comment update copy command copy node_monudes test workdir top level ls app folder test ls update yarn install copy more files remove copy fix copy move workdir to top level fix copy check folder test fix copy - last try prisma gen database url secret / env variable for ci/cd args env var args fix env fix copy fix build file name fix start command added copy ANOTHER COPY copy prisma generated files, fix start command remove standalone config fix urql url update display
66 lines
2.2 KiB
YAML
66 lines
2.2 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
REGISTRY: gitea.lucids-cove.duckdns.org
|
|
OWNER: wkc
|
|
IMAGE_NAME: no-twitter-bot-stats
|
|
|
|
jobs:
|
|
build-and-push-docker-image:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x]
|
|
steps:
|
|
- name: "Base requirements"
|
|
run: |
|
|
# packages
|
|
apk update && apk add --no-cache git docker docker-compose nodejs gpg openssh npm ansible
|
|
# ansible collections
|
|
ansible-galaxy collection install community.general --force
|
|
ansible-galaxy collection install ansible.posix --force
|
|
- uses: actions/checkout@v4
|
|
- name: Enable Corepack
|
|
run: npm install -g corepack && corepack enable
|
|
- name: Log into registry ${{ env.REGISTRY }}
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ env.OWNER }}
|
|
password: ${{ secrets.TOKEN }}
|
|
- name: Docker Hub Login
|
|
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Setup Docker buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}
|
|
- name: Build and Push Versioned Docker Image
|
|
id: build-and-push
|
|
uses: docker/build-push-action@v4
|
|
if: ${{ github.ref != 'refs/heads/main' }}
|
|
with:
|
|
context: .
|
|
push: ${{ !github.event.pull_request.head.repo.fork }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
build-args: API_URL=DATABASE_URL=${{ secrets.DATABASE_URL }}
|
|
- name: Build and Push Latest Docker Image
|
|
id: build-and-push-latest
|
|
uses: docker/build-push-action@v4
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:latest
|
|
build-args: DATABASE_URL=${{ secrets.DATABASE_URL }}
|