Skip to content

Commit

Permalink
add docker image package workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Feb 15, 2024
1 parent 53c1517 commit 95b07a8
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 4 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/update-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "update docker image"

on:
push:
branches: ['main']
paths:
- 'src/**'
- '!src/Data/**'
- '!src/StagingArea/**'

env:
REGISTRY: ghcr.io
IMAGE_NAME: avpr

jobs:
build-and-push-image:
#only publish docker images when tests succeed
#needs: [build-and-test-linux, build-and-test-windows]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

- name: Log in to the Container registry
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5.1.0
with:
context: ./src/PackageRegistryService/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions arc-validate-package-registry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "index-workflow", "index-wor
update-index.fsx = update-index.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".ci", ".ci", "{24F7CF58-94B9-4FB4-8A59-FD329B3C431D}"
ProjectSection(SolutionItems) = preProject
.github\workflows\update-docker-image.yml = .github\workflows\update-docker-image.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"RepoPath": "src/PackageRegistryService/StagingArea/invenio/invenio@1.0.0.fsx",
"FileName": "invenio@1.0.0.fsx",
"LastUpdated": "2024-02-12T13:12:45+01:00",
"LastUpdated": "2024-02-12T13:12:41+01:00",
"Metadata": {
"Name": "invenio",
"Description": "Validates if the ARC contains the necessary metadata to be publishable via Invenio.\nThe following metadata is required:\n - Investigation has title and description\n - All persons in Investigation Contacts must have a name, last name, affiliation and valid email\n",
Expand All @@ -18,7 +18,7 @@
{
"RepoPath": "src/PackageRegistryService/StagingArea/test/test@1.0.0.fsx",
"FileName": "test@1.0.0.fsx",
"LastUpdated": "2024-02-12T13:12:45+01:00",
"LastUpdated": "2024-02-12T13:12:41+01:00",
"Metadata": {
"Name": "test",
"Description": "this package is here for testing purposes only.",
Expand All @@ -34,7 +34,7 @@
{
"RepoPath": "src/PackageRegistryService/StagingArea/test/test@1.0.1.fsx",
"FileName": "test@1.0.1.fsx",
"LastUpdated": "2024-02-12T13:12:45+01:00",
"LastUpdated": "2024-02-12T13:12:41+01:00",
"Metadata": {
"Name": "test",
"Description": "this package is here for testing purposes only.",
Expand All @@ -50,7 +50,7 @@
{
"RepoPath": "src/PackageRegistryService/StagingArea/test/test@2.0.0.fsx",
"FileName": "test@2.0.0.fsx",
"LastUpdated": "2024-02-12T13:12:45+01:00",
"LastUpdated": "2024-02-12T13:12:41+01:00",
"Metadata": {
"Name": "test",
"Description": "this package is here for testing purposes only.",
Expand Down

0 comments on commit 95b07a8

Please sign in to comment.