Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mrupnikm authored Jul 20, 2024
1 parent ee5ddbb commit 6c04604
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,25 @@ on:

jobs:

build:
build-and-push:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build docker --file docker/Dockerfile --tag olm-chart-sops-decryption:$(date +%s)

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract current timestamp
id: timestamp
run: echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV

- name: Build Docker image
run: docker build docker --file docker/Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/olm-chart-sops-decryption:${{ env.TIMESTAMP }} .

- name: Push Docker image to Docker Hub
run: docker push ${{ secrets.DOCKER_USERNAME }}/olm-chart-sops-decryption:${{ env.TIMESTAMP }}

0 comments on commit 6c04604

Please sign in to comment.