Skip to content

Add files

Add files #6

Workflow file for this run

---
name: build-push
on:
push:
branches:
- main
workflow_dispatch:
env:
OWNER: opslabhq
FILE: ${{ github.event.repository.name }}
permissions:
contents: read
jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/[email protected]
with:
show-progress: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: opslabhq
password: ${{ secrets.DOCKER_SECRET }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_SECRET }}
- name: Extract version from Dockerfile
id: extract_version
run: |
echo "OWNER=${OWNER,,}" >> $GITHUB_ENV
echo "OWNER=${OWNER,,}"
echo "FILE=${FILE,,}" >> $GITHUB_ENV
echo "FILE=${FILE,,}"
TAG=$(grep -oP '^ARG ALPINE_VERSION=\K.*' Dockerfile)
echo "TAG=${TAG,,#v}" >> $GITHUB_ENV
echo "TAG=${TAG,,#v}"
- name: Push
uses: docker/bake-action@v5
with:
targets: push