Skip to content

Commit

Permalink
chore(ci): package
Browse files Browse the repository at this point in the history
  • Loading branch information
kjdev committed Dec 18, 2024
1 parent 00d4368 commit 0af8a8f
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: package

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

jobs:
package:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
provenance: false
push: true
tags: ghcr.io/${{ github.repository }}/nginx:${{ env.TAG }}
env:
TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }}

0 comments on commit 0af8a8f

Please sign in to comment.