+
This commit is contained in:
committed by
GitHub
parent
05f1269f05
commit
4a44b9ce1e
34
.github/workflows/docker.yml
vendored
34
.github/workflows/docker.yml
vendored
@@ -13,32 +13,48 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- v1
|
- v1
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||||
with:
|
with:
|
||||||
username: ewjoachim
|
registry: ${{ env.REGISTRY }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
with:
|
with:
|
||||||
images: ewjoachim/coverage-comment-action
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
flavor: |
|
|
||||||
latest=true
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
id: push
|
||||||
|
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
- name: Generate artifact attestation
|
||||||
|
uses: actions/attest-build-provenance@v1
|
||||||
|
with:
|
||||||
|
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
|
||||||
|
subject-digest: ${{ steps.push.outputs.digest }}
|
||||||
|
push-to-registry: true
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: Dockerfile
|
image: ghcr.io/getflow/coverage-comment-action:v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
||||||
COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }}
|
COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ JSON_URL = "https://raw.githubusercontent.com/wiki/{repo_name}/{filename}"
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
print("Starting action")
|
print("Starting action")
|
||||||
call("ssh-add", "-l")
|
|
||||||
print("TESTTTTTTTTT")
|
|
||||||
config = Config.from_environ(os.environ)
|
config = Config.from_environ(os.environ)
|
||||||
coverage_info = get_coverage_info(config=config)
|
coverage_info = get_coverage_info(config=config)
|
||||||
gh = get_api(config=config)
|
gh = get_api(config=config)
|
||||||
|
|||||||
Reference in New Issue
Block a user