-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (29 loc) · 1.01 KB
/
apache-proxy.yaml
File metadata and controls
36 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: apache-proxy
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: Deploy to Docker Hub
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set environment variables
run: echo "APACHE_OIDC_REPO=somrit/apache-oidc" >> $GITHUB_ENV
- name: Log in to Docker Hub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_API_TOKEN: ${{ secrets.DOCKER_API_TOKEN }}
run: echo "${{ secrets.DOCKER_API_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker image
run: |
docker build -f apache-oidc/Dockerfile -t ${{ env.APACHE_OIDC_REPO }}:github-build-${{ github.run_number }} -t ${{ env.APACHE_OIDC_REPO }}:latest .
- name: Push Docker image
run: |
docker push ${{ env.APACHE_OIDC_REPO }}:github-build-${{ github.run_number }}
docker push ${{ env.APACHE_OIDC_REPO }}:latest