Add workflow for building images
Some checks failed
publish-images / publish-vscode (push) Failing after 30s

This commit is contained in:
Torjus Håkestad 2024-02-01 16:14:03 +01:00
parent a36ec3c19b
commit f2bba2a98f
No known key found for this signature in database
GPG Key ID: C6FD38B820D295FC

View File

@ -0,0 +1,60 @@
name: publish-images
on:
push:
branches: [ master ]
schedule:
- cron: "0 4 * * 7"
env:
REGISTRY: git.t-juice.club
IMAGE_REPO: ${{ gitea.repository }}
DOCKER_TAG: nightly
jobs:
publish-vscode:
runs-on: ubuntu-latest
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
env:
DOCKER_ORG: torjus
DOCKER_TAG: latest
IMAGE_NAME: vscode
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # all history for all branches and tags
submodules: true
github-server-url: 'https://git.t-juice.club'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to git.t-juice.club registry
uses: docker/login-action@v3
with:
registry: git.t-juice.club
username: ${{ gitea.actor }}
password: ${{ secrets.DOCKER_PUSH }}
- 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
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.vscode
platforms: |
linux/amd64
push: true
tags: |
${{ env.REGISTRY }}/${{ gitea.repository }}/{{ env.IMAGE_NAME }}:${{ env.DOCKER_TAG }}