Skip to content

Commit

Permalink
Updates (#2)
Browse files Browse the repository at this point in the history
* Updates

* Updates

* Updates

* Updates

* Updates

* Updates
  • Loading branch information
adriananeci authored Jan 25, 2024
1 parent 9d73a1b commit 934cc0d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ignored:
- DL3018

- DL3059
57 changes: 57 additions & 0 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

# Controls when the action will run. Triggers the workflow on push to master branch or on schedule (on the 1st of every month)
# events
on:
push:
branches:
- main
tags:
- 'v*.*.*'
schedule:
- cron: '0 16 1 * *'


# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build and publish debug docker image
build_and_push:
# lint job must complete successfully before build_and_push job begins
needs:
- lint
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386
push: ${{ github.event_name != 'pull_request' }}
tags: |
aaneci/debug:latest
aaneci/debug:${{ steps.vars.outputs.sha_short }}
labels: |
debug=all_in_one
# tags: ${{ steps.docker_meta.outputs.tags }}
# labels: ${{ steps.docker_meta.outputs.labels }}
53 changes: 2 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@ name: CI

# Controls when the action will run. Triggers the workflow on push to master branch or on schedule (on the 1st of every month)
# events
on:
push:
branches:
- main
tags:
- 'v*.*.*'
schedule:
- cron: '0 16 1 * *'

on: [push]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -35,7 +27,7 @@ jobs:

# Runs the Super-Linter action
- name: Run Super-Linter
uses: github/super-linter@v6
uses: super-linter/super-linter@v5
env:
DEFAULT_BRANCH: main
VALIDATE_BASH: true
Expand All @@ -44,44 +36,3 @@ jobs:
VALIDATE_MARKDOWN: true
VALIDATE_YAML: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build and publish debug docker image
build_and_push:
# lint job must complete successfully before build_and_push job begins
needs:
- lint
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/386
push: ${{ github.event_name != 'pull_request' }}
tags: |
aaneci/debug:latest
aaneci/debug:${{ steps.vars.outputs.sha_short }}
labels: |
debug=all_in_one
# tags: ${{ steps.docker_meta.outputs.tags }}
# labels: ${{ steps.docker_meta.outputs.labels }}

0 comments on commit 934cc0d

Please sign in to comment.