Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Create create_container.yaml #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/create_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: create container
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
paths-ignore:
- "**.md"

jobs:
build-api:
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set envs
run: |
echo "GITHUB_REPO=$(echo ${GITHUB_REPOSITORY})" >> $GITHUB_ENV
echo "GITHUB_REF_NAME=$(echo ${GITHUB_REF_NAME##*/})" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io/dhtech
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
no-cache: true
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ env.GITHUB_REPO }}:${{ env.GITHUB_REF_NAME }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:7
FROM rockylinux:8

MAINTAINER Sebastian Svensson <[email protected]>