Skip to content

feat: added workflow and modified dockerfile #1

feat: added workflow and modified dockerfile

feat: added workflow and modified dockerfile #1

Workflow file for this run

name: Ulule-geoipfix
on:
push:
paths-ignore:
- '.github/**'
branches-ignore:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
timeout-minutes: 30
runs-on: [self-hosted, linux, x64]
steps:
- name: Checking out repository
uses: actions/checkout@v3
- name: Login to GCR
uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY }}
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Removing slashes from branch name when not tag or dev branch
id: git_tag
run: |
echo "GIT_TAG=${GIT_TAG//\//-}" >> "$GITHUB_OUTPUT"
env:
GIT_TAG: ${{ github.ref_name }}
- name: Build app and push
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: ${{ vars.REGISTRY }}/ulule-geoipfix:${{ github.sha }},${{ vars.REGISTRY }}/ulule-geoipfix:${{ steps.git_tag.outputs.GIT_TAG }}
cache-from: type=registry,ref=${{ vars.REGISTRY }}/ulule-geoipfix:cache
cache-to: type=registry,ref=${{ vars.REGISTRY }}/ulule-geoipfix:cache,mode=max