Skip to content

Commit

Permalink
Enable github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arvchristos committed Sep 11, 2023
1 parent 78e8200 commit 9e0f7be
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Rolling pipeline
name: Release to ghcr

on:
push:
branches: ['main']
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -32,11 +33,23 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Store the version, stripping any v-prefix
- name: Write release version
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/[email protected]
with:
file: ./files/Dockerfile
context: ./files
file: ./files/docker/Dockerfile
context: ./files/docker
push: true
tags: ghcr.io/cern-cert/pdnssoc:latest
labels: ${{ steps.meta.outputs.labels }}
tags: |
ghcr.io/cern-cert/pdnssoc:latest
ghcr.io/cern-cert/pdnssoc:${VERSION}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GO_DNSCOLLECTOR_VERSION:="0.35.0"
SUPERCRONIC_VERSION="v0.2.26"
PDNSSOC_CLI_VERSION="v0.0.2.dev5"
47 changes: 47 additions & 0 deletions .github/workflows/release_rolling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release edge version to ghcr

on:
push:
branches: ['main']

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/[email protected]
with:
file: ./files/docker/Dockerfile
context: ./files/docker
push: true
tags: |
ghcr.io/cern-cert/pdnssoc:edge
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GO_DNSCOLLECTOR_VERSION:="0.35.0"
SUPERCRONIC_VERSION="v0.2.26"
PDNSSOC_CLI_VERSION="v0.0.2.dev5"

0 comments on commit 9e0f7be

Please sign in to comment.