landing/.gitea/workflows/gitea.yaml
thomas 1044bd8615
Some checks failed
Tomcode landing build/deploy / build (push) Successful in 12s
Tomcode landing build/deploy / dockerize (push) Failing after 4s
Update .gitea/workflows/gitea.yaml
2024-09-22 13:52:39 +02:00

63 lines
1.7 KiB
YAML

name: Tomcode landing build/deploy
run-name: Tomcode landing is being built and deployed 🚀
on: [push]
jobs:
build:
name: build
runs-on: node
steps:
- name: Initialization
run: mkdir /app && cd /app && touch hello.txt
- name: Check out repository code
uses: actions/checkout@v4
- name: Download dependencies
run: |
echo "Downloading dependencies."
- name: Build
run: |
echo "Building application."
ls -la /
ls -la /app
- name: Upload application artifact
uses: actions/upload-artifact@v3
with:
name: application
path: /app
dockerize:
name: dockerize
needs: build
runs-on: host
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Download application artifact
uses: actions/download-artifact@v2
with:
name: application
- name: Test
run: cd app && ls -la && ls -la /
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[registry."git.tomcode.io"]
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: https://git.tomcode.io
username: ${{ vars.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT