mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove sample comments in workflow
This commit is contained in:
38
.github/workflows/build-container.yml
vendored
38
.github/workflows/build-container.yml
vendored
@@ -1,18 +1,16 @@
|
|||||||
name: Build container image
|
name: Build container image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
tags:
|
tags:
|
||||||
- '*' # This triggers the action on all tag pushes
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-docker-image:
|
publish-docker-image:
|
||||||
if: github.repository_owner == 'gbdev'
|
if: github.repository_owner == 'gbdev'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
# So that the workflow can write to the ghcr an upload there
|
|
||||||
packages: write
|
packages: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
@@ -26,7 +24,6 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push the master container image
|
- name: Build and push the master container image
|
||||||
# When a commit is pushed to master
|
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
run: |
|
run: |
|
||||||
COMMIT_HASH=$(git rev-parse --short HEAD)
|
COMMIT_HASH=$(git rev-parse --short HEAD)
|
||||||
@@ -35,45 +32,20 @@ jobs:
|
|||||||
docker push ghcr.io/gbdev/rgbds:master
|
docker push ghcr.io/gbdev/rgbds:master
|
||||||
|
|
||||||
- name: Build and push the version-tagged container image
|
- name: Build and push the version-tagged container image
|
||||||
# When a tag is pushed
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||||
sed -i "2i LABEL org.opencontainers.image.description=\"RGBDS container image for the release version $TAG_NAME\"" Dockerfile
|
sed -i "2i LABEL org.opencontainers.image.description=\"RGBDS container image for the release version $TAG_NAME\"" Dockerfile
|
||||||
docker build . --tag ghcr.io/gbdev/rgbds:$TAG_NAME
|
docker build . --tag ghcr.io/gbdev/rgbds:$TAG_NAME
|
||||||
docker push ghcr.io/gbdev/rgbds:$TAG_NAME
|
docker push ghcr.io/gbdev/rgbds:$TAG_NAME
|
||||||
- name: Delete untagged ghcr
|
|
||||||
|
- name: Delete untagged container images
|
||||||
|
if: github.repository_owner == 'gbdev'
|
||||||
uses: Chizkiyahu/delete-untagged-ghcr-action@v5
|
uses: Chizkiyahu/delete-untagged-ghcr-action@v5
|
||||||
with:
|
with:
|
||||||
# Personal access token (PAT) used to fetch the repository. The PAT is configured
|
# Requires a personal access token with delete:packages permissions
|
||||||
# with the local git config, which enables your scripts to run authenticated git
|
|
||||||
# commands. The post-job step removes the PAT.
|
|
||||||
# needs delete:packages permissions
|
|
||||||
# required: true
|
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
token: ${{ secrets.PAT_TOKEN }}
|
||||||
# Repository name or name with owner
|
|
||||||
# Delete only from repository name
|
|
||||||
# Default: ${{ github.repository }}
|
|
||||||
repository: 'rgbds'
|
|
||||||
# 'The repository owner name'
|
|
||||||
# Default: ${{ github.repository_owner }}
|
|
||||||
repository_owner: 'gbdev'
|
|
||||||
# 'The package names'
|
|
||||||
# Delete only from comma separated package names
|
|
||||||
# required: false
|
|
||||||
package_name: 'rgbds'
|
package_name: 'rgbds'
|
||||||
# Delete only package versions without tag
|
|
||||||
# required: false
|
|
||||||
# Default: true
|
|
||||||
# choices: true, false
|
|
||||||
untagged_only: true
|
untagged_only: true
|
||||||
# Exclude untagged multiplatform packages from deletion
|
|
||||||
# Manifests are usually such packages so they should be excluded
|
|
||||||
# only for untagged_only=true
|
|
||||||
# Default: true
|
|
||||||
# needs docker installed
|
|
||||||
except_untagged_multiplatform: true
|
except_untagged_multiplatform: true
|
||||||
# the owner type
|
|
||||||
# required: true
|
|
||||||
# choices: org, user
|
|
||||||
owner_type: 'org'
|
owner_type: 'org'
|
||||||
|
|||||||
Reference in New Issue
Block a user