Skip to content

README: running published container image #47

README: running published container image

README: running published container image #47

---
name: build_container
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
pull_request:
push:
tag:
- '*'
jobs:
build_container:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
- name: get gen-tz.py
run: curl --output /tmp/gen-tz.py https://raw.githubusercontent.com/nayarsystems/posix_tz_db/4b9caa3066434b015a99cadb74050fd46b7cc12b/gen-tz.py
- name: generate tz.json
run: python3 /tmp/gen-tz.py --json > tz.json
- name: login to ghcr.io
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: extract metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=ref,event=pr
type=ref,event=branch
- name: build container
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
labels: ${{ steps.metadata.outputs.labels }}
tags: ${{ steps.metadata.outputs.tags }}