Skip to content

Commit

Permalink
Github Action to Publish CronJob
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmontufar authored Jan 9, 2024
1 parent 9bdbfec commit a3b246a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: twistlock-updater:latest,twistlock-updater:$RELEASE_VERSION
cache-from: type=registry,ref=twistlock-updater:latest
cache-to: type=inline

0 comments on commit a3b246a

Please sign in to comment.