Skip to content

Commit

Permalink
add container publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaw committed Jun 19, 2023
1 parent a284502 commit 172549d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI

on: push

permissions:
contents: read
packages: write

jobs:
build-and-package:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -29,3 +33,26 @@ jobs:
prerelease: false
files: |
./dist/build.tar
- name: Buildah Build
id: build-container
uses: redhat-actions/[email protected]
with:
containerfiles: |
./container/Containerfile
image: ${{github.event.repository.full_name}}
tags: latest ${{ github.sha }}
oci: true

- name: Push To Registry
id: push-to-registry
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build-container.outputs.image }}
tags: ${{ steps.build-container.outputs.tags }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}"
5 changes: 5 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM registry.access.redhat.com/ubi9/nginx-122:1-12

ADD dist .

CMD nginx -g "daemon off;"

0 comments on commit 172549d

Please sign in to comment.