Skip to content

Cleanup a bit

Cleanup a bit #21

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
paths-ignore:
- './*.md'
tags:
- 'v[0-9]+.[0-9]+.*'
branches:
- master
env:
DOCKER_USERNAME: ${{ vars.GHCR_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.GHCR_TOKEN }}
FORCE_COLOR: 1
jobs:
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download latest earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.3/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Put back the git branch into git (Earthly uses it for tagging)
run: |
branch=""
if [ -n "$GITHUB_HEAD_REF" ]; then
branch="$GITHUB_HEAD_REF"
else
branch="${GITHUB_REF##*/}"
fi
git checkout -b "$branch" || true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ vars.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push docker image
run: |
earthly --ci --push +build \
--TARGET_DOCKER_REGISTRY=ghcr.io/librepod \
--ARGOCD_TAG=${{ github.ref_name }} \
--ARGOCD_BASE_IMAGE=quay.io/argoproj/argocd