Skip to content

Commit

Permalink
amazonlinux
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Feb 4, 2024
1 parent 347c698 commit 6963111
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 15 deletions.
63 changes: 48 additions & 15 deletions .github/workflows/build-push-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,58 @@ on:
push:

jobs:
docker:
release:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
buluma/docker-ubuntu-systemd
ghcr.io/buluma/docker-ubuntu-systemd
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set short
run: echo "short=${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
- name: Set tag
run: echo "tag=${short/master/latest}" >> "${GITHUB_ENV}"
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2

- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image.
uses: docker/build-push-action@v5
with:
push: true
tags: buluma/amazonlinux:${{ env.tag }}
context: .
sbom: true
provenance: mode=max
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
buluma/amazonlinux:${{ env.tag }}
ghcr.io/buluma/amazonlinux:${{ env.tag }}
labels: ${{ steps.meta.outputs.labels }}
63 changes: 63 additions & 0 deletions .github/workflows/update_desc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: Update repo description

on:
pull_request:
push:
paths:
- 'README.md'
workflow_dispatch:
inputs:
debug:
type: boolean
required: false
default: 'false'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
# update docker repo description
release:
name: Update
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
name/app
ghcr.io/username/app
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Update repo description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: buluma/amazonlinux
short-description: ${{ github.event.repository.description }}
enable-url-completion: true

0 comments on commit 6963111

Please sign in to comment.