dumb-downloader/.github/workflows/container-stable.yaml

54 lines
1.4 KiB
YAML
Raw Normal View History

2023-01-17 21:35:35 +00:00
---
name: "Stable container"
2023-01-24 11:50:04 +00:00
on:
push:
2023-01-24 11:49:34 +00:00
# branches:
# - main
2023-01-17 21:35:35 +00:00
jobs:
containerization:
runs-on: ubuntu-latest
2023-01-24 12:56:06 +00:00
permissions:
packages: write
2023-01-17 21:35:35 +00:00
steps:
- name: Checkout
2023-01-24 12:23:55 +00:00
uses: actions/checkout@v3
2023-01-17 21:35:35 +00:00
- name: Set action link variable
run: echo "LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Login to GitHub Container Registry
2023-01-24 12:23:55 +00:00
uses: docker/login-action@v2
2023-01-17 21:35:35 +00:00
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
2023-01-24 12:23:55 +00:00
password: ${{ secrets.GITHUB_TOKEN }}
2023-01-17 21:35:35 +00:00
- name: Build
2023-01-24 11:49:34 +00:00
uses: docker/build-push-action@v3
2023-01-17 21:35:35 +00:00
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
2023-01-24 12:56:06 +00:00
platforms: linux/amd64,linux/arm64
2023-01-17 21:35:35 +00:00
push: true
tags: |
ghcr.io/${{ github.repository }}:stable
ghcr.io/${{ github.repository }}:latest
2023-01-17 21:35:35 +00:00
labels: |
action_id=${{ github.action }}
action_link=${{ env.LINK }}
actor=${{ github.actor }}
sha=${{ github.sha }}
ref=${{ github.ref }}