Skip to content

Commit

Permalink
Automate Docker images build & push
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez committed May 27, 2024
1 parent 4c18af1 commit ceeab88
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and publish Docker images

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
pair:
- { dir: 'dns', tag: 'dns' }
- { dir: 'krb5kdc', tag: 'kdc-centos-default' }
- { dir: 'krb5kdc-latest', tag: 'kdc-latest' }
- { dir: 'krb5kdc-older', tag: 'kdc-older' }
- { dir: 'krb5kdc-res', tag: 'kdc-resdom' }
- { dir: 'krb5kdc-shorttickets', tag: 'kdc-shorttickets' }
- { dir: 'krb5kdc-sub', tag: 'kdc-sub' }
- { dir: 'krbhttp', tag: 'http' }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t ghcr.io/grafana/gokrb5-test:${{ matrix.pair.tag }} testenv/docker/${{ matrix.pair.dir }}
- name: Log in to GitHub Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker push ghcr.io/grafana/gokrb5-test:${{ matrix.pair.tag }}
1 change: 0 additions & 1 deletion testenv/docker/krbhttp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN cd /etc/yum.repos.d/ \

RUN yum install -y \
httpd \
mod_auth_kerb \
mod_auth_gssapi \
mod_session \
mod_ssl \
Expand Down

0 comments on commit ceeab88

Please sign in to comment.