Skip to content

wip: package

wip: package #1

Workflow file for this run

name: package
on: [push]
# 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 }}
tags: |
ghcr.io/${{ github.repository }}/nginx:latest
ghcr.io/${{ github.repository }}/nginx:0.3.0
env:
TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }}