initial commit
This commit is contained in:
70
.github/workflows/build-arch-images.yml
vendored
Normal file
70
.github/workflows/build-arch-images.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ master ]
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths: [ docker/* ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths: [ docker/* ]
|
||||
schedule:
|
||||
- cron: '0 5 * * 4'
|
||||
|
||||
jobs:
|
||||
|
||||
build_arch_images:
|
||||
name: Build build images
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
images:
|
||||
[
|
||||
arch,
|
||||
artix
|
||||
]
|
||||
env:
|
||||
DH_REGISTRY: docker.io
|
||||
REPO_ORG: corysanin
|
||||
IMAGE_NAME: archy-build-thing
|
||||
ABSOLUTE_DH_IMAGE: ${{ env.DH_REGISTRY }}/${{ REPO_ORG }}/${{ env.IMAGE_NAME }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
# - name: Checkout repository
|
||||
# uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Build Docker image
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
push: false
|
||||
pull: true
|
||||
no-cache: true
|
||||
context: ./docker/
|
||||
file: ./docker/Dockerfile.${{ matrix.images }}
|
||||
tags: "${{ env.ABSOLUTE_DH_IMAGE }}:${{ matrix.images }}"
|
||||
|
||||
- name: Log in to the Docker Hub
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.DH_REGISTRY }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Push to Docker Hub
|
||||
if: github.ref == 'refs/heads/master' && ( gitea.event_name == 'push' || gitea.event_name == 'schedule' )
|
||||
run: docker push "${{ env.ABSOLUTE_DH_IMAGE }}:${{ matrix.images }}"
|
Reference in New Issue
Block a user