diff --git a/.github/actions/build/docker/action.yml b/.github/actions/build/docker/action.yml index cf6d3c2e..ffc62fe8 100644 --- a/.github/actions/build/docker/action.yml +++ b/.github/actions/build/docker/action.yml @@ -49,18 +49,18 @@ runs: ########################### Log into Dockerhub ########################### - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3.0.0 with: username: ${{ inputs.docker_hub_username }} password: ${{ inputs.docker_hub_access_token }} ########################### Setup Docker ########################### - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3.0.0 ########################### Build and Push Docker images ########################### - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5.1.0 id: docker_build with: context: . diff --git a/.github/actions/build/dpkg/action.yml b/.github/actions/build/dpkg/action.yml index 4673c1f6..9c086028 100644 --- a/.github/actions/build/dpkg/action.yml +++ b/.github/actions/build/dpkg/action.yml @@ -64,7 +64,7 @@ runs: package: osctrl-${{ inputs.osctrl_component }} package_root: ".debpkg-osctrl-${{ inputs.osctrl_component }}-${{ inputs.commit_sha }}-${{ inputs.go_os }}-${{ inputs.go_arch }}" maintainer: jmpsec/osctrl - version: ${{ inputs.commit_sha }} + version: "0.0-${{ inputs.commit_sha }}" arch: ${{ inputs.go_arch }} desc: "DEB package for osctrl-${OSCTRL_COMPONENT}-${OSCTRL_VERSION} Commit SHA: ${COMMIT_SHA}" diff --git a/.github/actions/tagged_release/docker/codesign/action.yml b/.github/actions/tagged_release/docker/codesign/action.yml index 4717bfce..d6de416d 100644 --- a/.github/actions/tagged_release/docker/codesign/action.yml +++ b/.github/actions/tagged_release/docker/codesign/action.yml @@ -47,7 +47,7 @@ runs: ########################### Log into Dockerhub ########################### - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3.0.0 with: username: ${{ inputs.docker_hub_username }} password: ${{ inputs.docker_hub_access_token }} diff --git a/.github/actions/tagged_release/github/action.yml b/.github/actions/tagged_release/github/action.yml index 3934f6df..10412054 100644 --- a/.github/actions/tagged_release/github/action.yml +++ b/.github/actions/tagged_release/github/action.yml @@ -59,7 +59,7 @@ runs: ########################### Release ########################### - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v0.1.15 if: startsWith(github.ref, 'refs/tags/') with: files: | diff --git a/.github/actions/test/binaries/action.yml b/.github/actions/test/binaries/action.yml index 6ecd5de9..2d587405 100644 --- a/.github/actions/test/binaries/action.yml +++ b/.github/actions/test/binaries/action.yml @@ -39,7 +39,7 @@ runs: ########################### Lint golang code ########################### - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4.0.0 with: version: v1.29 diff --git a/deploy/cicd/deb/deb-conffiles b/deploy/cicd/deb/deb-conffiles index e90eeadb..01725f44 100644 --- a/deploy/cicd/deb/deb-conffiles +++ b/deploy/cicd/deb/deb-conffiles @@ -1,2 +1,2 @@ -/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}/service.json -/etc/systemd/system/osctrl-{{ OSCTRL_COMPONTENT }}.service +/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}/service.json +/etc/systemd/system/osctrl-{{ OSCTRL_COMPONENT }}.service diff --git a/deploy/cicd/deb/post-init.sh b/deploy/cicd/deb/post-init.sh index f2c11c9d..bc419cf0 100644 --- a/deploy/cicd/deb/post-init.sh +++ b/deploy/cicd/deb/post-init.sh @@ -3,24 +3,24 @@ set -e ################### Set perms on config directory ################### -if [ -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}" ] +if [ -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}" ] then - chown root:osctrl -R /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }} + chown root:osctrl -R /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }} fi ################### Copy common configs ################### if [ ! -f /usr/share/osctrl/db.json.example ] then - cp /tmp/osctrl-{{ OSCTRL_COMPONTENT }}/db.json.example /usr/share/osctrl/db.json.example + cp /tmp/osctrl-{{ OSCTRL_COMPONENT }}/db.json.example /usr/share/osctrl/db.json.example chown root:root /usr/share/osctrl/db.json.example fi if [ ! -f /usr/share/osctrl/redis.json.example ] then - cp /tmp/osctrl-{{ OSCTRL_COMPONTENT }}/redis.json.example /usr/share/osctrl/redis.json.example + cp /tmp/osctrl-{{ OSCTRL_COMPONENT }}/redis.json.example /usr/share/osctrl/redis.json.example chown root:root /usr/share/osctrl/redis.json.example fi -rm -rd /tmp/osctrl-{{ OSCTRL_COMPONTENT }} +rm -rd /tmp/osctrl-{{ OSCTRL_COMPONENT }} ################### osctrl-admin web assets ################### if [ -d "/usr/share/osctrl/tmpl_admin" ] @@ -36,8 +36,6 @@ then # new files and folders inherit group ownership from the parent folder chmod g+s /usr/share/osctrl/tmpl_admin/ - - fi if [ -d "/usr/share/osctrl/static" ] diff --git a/deploy/cicd/deb/pre-init.sh b/deploy/cicd/deb/pre-init.sh index e2a3af6e..92557b12 100644 --- a/deploy/cicd/deb/pre-init.sh +++ b/deploy/cicd/deb/pre-init.sh @@ -13,11 +13,11 @@ then chown root:root -R /etc/osctrl fi -if [ ! -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }}" ] +if [ ! -d "/etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }}" ] then - echo "Directory /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }} DOES NOT exists." - mkdir /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }} - chown root:osctrl /etc/osctrl/osctrl-{{ OSCTRL_COMPONTENT }} + echo "Directory /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }} DOES NOT exists." + mkdir /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }} + chown root:osctrl /etc/osctrl/osctrl-{{ OSCTRL_COMPONENT }} fi ################### Create osctrl log directory ###################